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

Fix README for Puppet 4 #85

Closed
wants to merge 1 commit into from
Closed

Conversation

beergeek
Copy link

This update advises the user of how to install the AIO agent for Puppet
4. Without this advice the user cannot test Puppet 4 code.

This update advises the user of how to install the AIO agent for Puppet
4. Without this advice the user cannot test Puppet 4 code.
@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-rspec_btc-intn-sys/35/

on host, install_puppet
# Select the correct method below.
on host, install_puppet # this is for Puppet 3
install_puppet_agent_on(host, :version => '1.5.2') # this is for Puppet 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_puppet is itself a shortcut to installing puppet on all hosts available. This means that for running it on all hosts, you're installing puppet hosts*hosts number of times.

This should actually be just install_puppet outside of the hosts loop, or if wanted inside the loop, it should be done with this line:

install_puppet_on(host, options)

Note that the options are the global options (accessible from the shim as the options method used here).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ps - Doesn't the code say that install_puppet is deprecated in favor of install_puppet_on()?
https://github.com/puppetlabs/beaker/blob/0e13b888970aae8fb82343078ce14eef69bb236c/lib/beaker/dsl/install_utils/foss_utils.rb#L204

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is. There's one known issue with using install_puppet_on, however, which can be gotten around by providing the global options hash as the opts parameter to that method.

@kevpl
Copy link
Contributor

kevpl commented Sep 19, 2016

will close this due to inactivity if there's no movement in a week.

@wyardley
Copy link

I'm having a maybe related problem where a test seems to be failing on the exact code that's given in the README:

ubuntu-server-1404-x64 14:31:47$ puppet agent --configprint hiera_config
  /etc/puppet/hiera.yaml

ubuntu-server-1404-x64 executed in 0.45 seconds

ubuntu-server-1404-x64 14:31:47$ echo '' >> /etc/puppet/hiera.yaml

ubuntu-server-1404-x64 executed in 0.00 seconds
/usr/local/lib/ruby/gems/2.3.0/gems/beaker-2.51.0/lib/beaker/dsl/helpers/host_helpers.rb:81:in `block in on': DSL method `on` can only be called with a String or Beaker::Command object as the command parameter, not NilClass. (ArgumentError)
    from /usr/local/lib/ruby/gems/2.3.0/gems/beaker-2.51.0/lib/beaker/shared/host_manager.rb:127:in `run_block_on'
    from /usr/local/lib/ruby/gems/2.3.0/gems/beaker-2.51.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
    from /usr/local/lib/ruby/gems/2.3.0/gems/beaker-2.51.0/lib/beaker/dsl/helpers/host_helpers.rb:63:in `on'
    from /Users/wby/git/puppet-nginx/spec/spec_helper_acceptance.rb:6:in `block in <top (required)>'
    from /Users/wby/git/puppet-nginx/spec/spec_helper_acceptance.rb:4:in `each'
    from /Users/wby/git/puppet-nginx/spec/spec_helper_acceptance.rb:4:in `<top (required)>'
    from /Users/wby/git/puppet-nginx/spec/acceptance/class_spec.rb:1:in `require'
    from /Users/wby/git/puppet-nginx/spec/acceptance/class_spec.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1435:in `load'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1433:in `each'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1433:in `load_spec_files'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:100:in `setup'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:86:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:71:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:45:in `invoke'
    from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/exe/rspec:4:in `<main>'
/usr/local/Cellar/ruby/2.3.1/bin/ruby -I/usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/lib:/usr/local/lib/ruby/gems/2.3.0/gems/rspec-support-3.5.0/lib /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.3/exe/rspec spec/acceptance failed

I'm guessing in this change,
install_puppet_agent_on(host, :version => '1.5.2') # this is for Puppet 4
host should be hosts?

With beaker 2.51.0, the example given in the docs doesn't seem to work for me, so I think this should be fixed, rather than closed. Either that, or bit that handles using the deprecated install_puppet method isn't working right?

install_puppet_agent_on(hosts) does seem to work for me where the example in the docs does not.

@kevpl
Copy link
Contributor

kevpl commented Oct 25, 2016

@wyardley please submit your issue as a separate BKR JIRA ticket, and we'll take a look at that. Since there has been no movement on this PR, I'll close it now.

@kevpl kevpl closed this Oct 25, 2016
@wyardley
Copy link

@kevpl: Thanks, created https://tickets.puppetlabs.com/browse/BKR-968

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.

4 participants