Ask Your Question
0

service start causes Beaker to show warnings as errors.

asked 2017-02-03 16:23:19 -0500

dev_dull gravatar image

updated 2017-02-03 16:25:06 -0500

Here's a weird one: When running bundle exec rake beaker I get these deprecation warnings (via an older version of puppet/nodejs)

centos-7-x64 13:26:14$ puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.dSmdfP
  Info: Loading facts
  Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.
     (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
  Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.
     (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
  Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.
     (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
  Notice: Compiled catalog for centos-7-x64.thisIsABogusDomain.com in environment production in 0.35 seconds
  Info: Applying configuration version '1486157175'
  Notice: Applied catalog in 1.79 seconds

centos-7-x64 executed in 4.10 seconds
    should work idempotently with no errors

Finished in 55.69 seconds (files took 1 minute 58.71 seconds to load)
1 example, 0 failures

Those warnings turn into this error

1) myClass::myMod class default parameters should work idempotently with no errors
   Failure/Error: apply_manifest(pp, :catch_changes  => true)
   Beaker::Host::CommandFailure:
     Host 'centos-7-x64' exited with 2 running:
      puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.HaiSli
     Last 10 lines of output were:
      Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.
         (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
      Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.
         (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
      Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.
         (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
      Notice: Compiled catalog for centos-7-x64.thisIsABogusDomain.com in environment production in 0.45 seconds
      Info: Applying configuration version '1486157593'
      Notice: /Stage[main]/myClass::myMod/Service[myModvc]/enable: enable changed 'false' to 'true'
      Notice: Applied catalog in 2.03 seconds

   # ./spec/acceptance/myClass_myMod_spec.rb:19:in `block (3 levels) in <top (required)>'

Finished in 1 minute 0.3 seconds (files took 1 minute 57.51 seconds to load)
1 example, 1 failure

when I added this service block.

service { 'myModvc':
  ensure     => running,
  enable     => true,
  hasstatus  => true,
  hasrestart => true,
}

I can comment the service block out and the error goes away. The service starts with exit code 0 and behaves as expected. I've removed ... (more)

edit retag flag offensive close merge delete

Comments

Here's some more info: It's failing on `catch_changes`. The files being created are `/var/run/myOrg/pidfile.pid` `/var/log/myOrg/logfile.log` and `/opt/myOrg/legacy.log` For an issue like this, I'd normally I'd add a `creates =>`, but `service` does not support that.

dev_dull gravatar imagedev_dull ( 2017-02-07 14:55:18 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-02-07 16:37:32 -0500

dev_dull gravatar image

I ran my tests using puppet agent versions 1.4.1, 1.4.2, 1.5.0, 1.5.1, and 1.5.2. I found that starting with 1.5.0, the tests no longer returns with a failure. I'm left to assume that I'm either using a service feature not supported in 1.4.1 (as shown above, I'm not doing anything fancy, so that seems unlikely), or I've hit some kind of bug; MODULES-3968 appears to be a match.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-02-03 16:23:19 -0500

Seen: 33 times

Last updated: Feb 07