Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes windows masterless installation #1

Merged
merged 3 commits into from
May 18, 2016
Merged

Fixes windows masterless installation #1

merged 3 commits into from
May 18, 2016

Conversation

Renelast
Copy link

Setting up a masterless windows client would fail with the following error:

Exited: 1
/usr/local/rvm/gems/ruby-2.2.1/gems/beaker-2.37.0/lib/beaker/host.rb:330:in `exec': Host 'sxrwjhkia9gzo03' exited with 1 running: (Beaker::Host::CommandFailure)
cmd.exe /c puppet config set server
Last 10 lines of output were:
Error: puppet config set takes 2 arguments, but you gave 1
Error: Try 'puppet help config set' for usage

As far as I could see this error is caused by the 'setup_defaults_and_config_helper_on' function which tries to set the master configuration setting in puppet.conf. But since there is no master varaible available this failes.

This patch should fix that by only calling setup_defaults_and_config_helper_on whern we're not doing a masterless installation.

Setting up a masterless windows client would fail with the following error:

Exited: 1
/usr/local/rvm/gems/ruby-2.2.1/gems/beaker-2.37.0/lib/beaker/host.rb:330:in `exec': Host 'sxrwjhkia9gzo03' exited with 1 running: (Beaker::Host::CommandFailure)
 cmd.exe /c puppet config set server
Last 10 lines of output were:
        Error: puppet config set takes 2 arguments, but you gave 1
        Error: Try 'puppet help config set' for usage

As far as I could see this error is caused by the 'setup_defaults_and_config_helper_on' function which tries to set the master configuration setting in puppet.conf. But since there is no master varaible available this failes.

This patch should fix that by only calling setup_defaults_and_config_helper_on whern we're not doing a masterless installation.
@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@kevpl
Copy link
Contributor

kevpl commented Apr 20, 2016

@puppetlabs-jenkins test this please

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@kevpl
Copy link
Contributor

kevpl commented Apr 20, 2016

@puppetlabs-jenkins retest this please

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/1/
Test FAILed.

@kevpl
Copy link
Contributor

kevpl commented Apr 20, 2016

@puppetlabs-jenkins retest this please

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/2/
Test FAILed.

@Renelast
Copy link
Author

As I have no access to the CI server can anyone help me to get this corrected?

@glennsarti
Copy link

@Renelast

Same failure in Ruby 1.9.3, 2.0 and 2.1
This is log from ruby 2.0

bundle exec rake test is the testing command


[ Job Setup ]

Bundle complete! 11 Gemfile dependencies, 103 gems now installed.
Bundled gems are installed into ./vendor/bundle.
/usr/local/rvm/rubies/ruby-2.0.0-p481/bin/ruby -I/var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.4.4/lib:/var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.4.1/lib /var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.4.4/exe/rspec spec/ --color

ClassMixedWithDSLHelpers
  release conditions
    has updated the version number from the original template

ClassMixedWithDSLInstallUtils
  #configure_pe_defaults_on
    uses aio paths for hosts of role aio
    uses pe paths for hosts of type pe
    uses aio paths for hosts of type aio
    uses no paths for hosts with no type
    uses aio paths for hosts of version >= 4.0
    uses pe paths for hosts of version < 4.0
  sorted_hosts
    can reorder so that the master comes first
    leaves correctly ordered hosts alone
    does not allow nil entries
  installer_cmd
    generates a unix PE install command for a unix host
    generates a unix PE frictionless install command for a unix host with role "frictionless"
    generates a unix PE frictionless install command for a unix host with role "frictionless" and "frictionless_options"
    generates a osx PE install command for a osx host
    calls the EOS PE install command for an EOS host
    generates a unix PE install command in verbose for a unix host when pe_debug is enabled
    generates a osx PE install command in verbose for a osx host when pe_debug is enabled
    generates a unix PE frictionless install command in verbose for a unix host with role "frictionless" and pe_debug is enabled
  fetch_pe
    can push a local PE .tar.gz to a host and unpack it
    can download a PE .tar from a URL to a host and unpack it
    can download a PE .tar from a URL to #fetch_and_push_pe
    can download a PE .tar.gz from a URL to a host and unpack it
    can download a PE .tar.gz from a URL to #fetch_and_push_pe
    calls the host method to get an EOS .swix file from a URL
    can push a local PE package to a windows host
    can download a PE dmg from a URL to a mac host
    can push a PE dmg to a mac host
    does nothing for a frictionless agent for PE >= 3.2.0
  do_install
    can perform a simple installation (FAILED - 1)
    can perform a masterless installation
    can perform a 4+ installation using AIO agents (FAILED - 2)
    can perform a 4/3 mixed installation with AIO and -non agents (FAILED - 3)
    sets puppet-agent acceptable_exit_codes correctly for config helper on upgrade (FAILED - 4)
  do_higgs_install
    can perform a simple installation
    fails out after checking installation log 10 times
  install_pe
    calls do_install with sorted hosts
    fills in missing pe_ver
    can act upon a single host
  install_higgs
    fills in missing pe_ver
  upgrade_pe
    calls puppet-enterprise-upgrader for pre 3.0 upgrades
    uses standard upgrader for post 3.0 upgrades
    updates pe_ver post upgrade
    can act upon a single host
  fetch_and_push_pe
    fetches the file
    allows you to set the local copy dir
    scp's to the host
  create_agent_specified_arrays
    sorts hosts with common PE roles
    defaults to classifying custom roles as "agent only"
    allows a puppet-agent host to be the default test target
    handles masterless scenarios
    handles agent-only-less scenarios

Beaker::Options::PEVersionScraper
  can pull version from local LATEST file
  can pull version from preview LATEST file
  raises error when file doesn't exist

Failures:

  1) ClassMixedWithDSLInstallUtils do_install can perform a simple installation
     Failure/Error:
                   step "First puppet agent run" do
                     # Run the agent once to ensure everything is in the dashboard
                     install_hosts.each do |host|
                       on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]

                       # Workaround for PE-1105 when deploying 3.0.0
                       # The installer did not respect our database host answers in 3.0.0,
                       # and would cause puppetdb to be bounced by the agent run. By sleeping
                       # again here, we ensure that if that bounce happens during an upgrade
                       # test we won't fail early in the install process.

     NameError:
       undefined local variable or method `metadata' for #<ClassMixedWithDSLInstallUtils:0x00000003bd7128>
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/helpers/test_helpers.rb:65:in `set_current_step_name'
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/structure.rb:40:in `step'
     # ./lib/beaker-pe/install/pe_utils.rb:452:in `do_install'
     # ./spec/beaker-pe/install/pe_utils_spec.rb:412:in `block (3 levels) in <top (required)>'

  2) ClassMixedWithDSLInstallUtils do_install can perform a 4+ installation using AIO agents
     Failure/Error:
                   step "First puppet agent run" do
                     # Run the agent once to ensure everything is in the dashboard
                     install_hosts.each do |host|
                       on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]

                       # Workaround for PE-1105 when deploying 3.0.0
                       # The installer did not respect our database host answers in 3.0.0,
                       # and would cause puppetdb to be bounced by the agent run. By sleeping
                       # again here, we ensure that if that bounce happens during an upgrade
                       # test we won't fail early in the install process.

     NameError:
       undefined local variable or method `metadata' for #<ClassMixedWithDSLInstallUtils:0x0000000500a870>
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/helpers/test_helpers.rb:65:in `set_current_step_name'
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/structure.rb:40:in `step'
     # ./lib/beaker-pe/install/pe_utils.rb:452:in `do_install'
     # ./spec/beaker-pe/install/pe_utils_spec.rb:505:in `block (3 levels) in <top (required)>'

  3) ClassMixedWithDSLInstallUtils do_install can perform a 4/3 mixed installation with AIO and -non agents
     Failure/Error:
                   step "First puppet agent run" do
                     # Run the agent once to ensure everything is in the dashboard
                     install_hosts.each do |host|
                       on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]

                       # Workaround for PE-1105 when deploying 3.0.0
                       # The installer did not respect our database host answers in 3.0.0,
                       # and would cause puppetdb to be bounced by the agent run. By sleeping
                       # again here, we ensure that if that bounce happens during an upgrade
                       # test we won't fail early in the install process.

     NameError:
       undefined local variable or method `metadata' for #<ClassMixedWithDSLInstallUtils:0x000000050b35d8>
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/helpers/test_helpers.rb:65:in `set_current_step_name'
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/structure.rb:40:in `step'
     # ./lib/beaker-pe/install/pe_utils.rb:452:in `do_install'
     # ./spec/beaker-pe/install/pe_utils_spec.rb:566:in `block (3 levels) in <top (required)>'

  4) ClassMixedWithDSLInstallUtils do_install sets puppet-agent acceptable_exit_codes correctly for config helper on upgrade
     Failure/Error:
                   step "First puppet agent run" do
                     # Run the agent once to ensure everything is in the dashboard
                     install_hosts.each do |host|
                       on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]

                       # Workaround for PE-1105 when deploying 3.0.0
                       # The installer did not respect our database host answers in 3.0.0,
                       # and would cause puppetdb to be bounced by the agent run. By sleeping
                       # again here, we ensure that if that bounce happens during an upgrade
                       # test we won't fail early in the install process.

     NameError:
       undefined local variable or method `metadata' for #<ClassMixedWithDSLInstallUtils:0x000000051718d0>
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/helpers/test_helpers.rb:65:in `set_current_step_name'
     # ./vendor/bundle/ruby/2.0.0/gems/beaker-2.40.0/lib/beaker/dsl/structure.rb:40:in `step'
     # ./lib/beaker-pe/install/pe_utils.rb:452:in `do_install'
     # ./spec/beaker-pe/install/pe_utils_spec.rb:628:in `block (3 levels) in <top (required)>'

Finished in 0.43273 seconds (files took 3.84 seconds to load)
54 examples, 4 failures

Failed examples:

rspec ./spec/beaker-pe/install/pe_utils_spec.rb:345 # ClassMixedWithDSLInstallUtils do_install can perform a simple installation
rspec ./spec/beaker-pe/install/pe_utils_spec.rb:448 # ClassMixedWithDSLInstallUtils do_install can perform a 4+ installation using AIO agents
rspec ./spec/beaker-pe/install/pe_utils_spec.rb:508 # ClassMixedWithDSLInstallUtils do_install can perform a 4/3 mixed installation with AIO and -non agents
rspec ./spec/beaker-pe/install/pe_utils_spec.rb:569 # ClassMixedWithDSLInstallUtils do_install sets puppet-agent acceptable_exit_codes correctly for config helper on upgrade

/usr/local/rvm/rubies/ruby-2.0.0-p481/bin/ruby -I/var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.4.4/lib:/var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.4.1/lib /var/lib/jenkins/workspace/qe_gem_unit-rb_rspec/label/unit/ruby/2.0.0-p481/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.4.4/exe/rspec spec/ --color failed

Finished: FAILURE

@tvpartytonight
Copy link
Contributor

@Renelast and @glennsarti ,we just merged in a PR, commit c1ea366, that should address the metadata failure that you were seeing in your last run; Would you mind updating and rebasing your PR to get successful spec run?

@Renelast
Copy link
Author

@tvpartytonight updated my PR as requested

@tvpartytonight
Copy link
Contributor

@puppetlabs-jenkins test this please

@kevpl kevpl merged commit ef4be9a into puppetlabs:master May 18, 2016
@Renelast Renelast deleted the fix/windows_masterless branch July 13, 2016 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants