Issue #15534 has been updated by Ryan Conway.
Going to have to bump this as I've just noticed a severe issue this is causing
- those services are defined in the main stage, and I have a stage which
requires main to ensure it is done after everything else. Because of these
errors, main doesn't seem to be marked as completed successfully, so any
dependencies on it also fail. For example, this stage and all resources within
it fail to apply because of failed dependencies on stage main.
stage { 'ih_last': require => Stage['main'] }
----------------------------------------
Bug #15534: Could not evaluate: undefined method `each' for
#<String:0x0000000434d380>
https://projects.puppetlabs.com/issues/15534#change-67342
Author: Ryan Conway
Status: Unreviewed
Priority: High
Assignee:
Category:
Target version:
Affected Puppet version: 2.7.18
Keywords:
Branch:
I'm seeing what looks like issue #12268 with the latest Puppet 2.7.18, using
Ruby 1.9.2p290 on Ubuntu 12.04 LTS. (I can't re-open that one hence the
separate ticket).
Using the following resource:
service { "ssh":
enable => true,
ensure => running,
subscribe => [File["/etc/default/ssh"], File["/etc/ssh/sshd_config"]],
}
I get the following error:
err: /Stage[main]/Ih-default/Ssh-client[ih]/Service[ssh]: Could not
evaluate: undefined method `each' for #<String:0x0000000434d380>
And the full stack trace:
debug: /Stage[main]/Ih-default/Ssh-client[ih]/File[/etc/default/ssh]: The
container Ssh-client[ih] will propagate my refresh event
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/status ssh'
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/initctl
--version'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/provider/service/upstart.rb:203:in
`enabled_post_0_9_0?'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/provider/service/upstart.rb:101:in
`enabled?'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/type/service.rb:55:in
`retrieve'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/type.rb:720:in
`block in retrieve'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/type.rb:715:in
`each'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/type.rb:715:in
`retrieve'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/type.rb:728:in
`retrieve_resource'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction/resource_harness.rb:32:in
`perform_changes'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction/resource_harness.rb:133:in
`evaluate'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:49:in
`apply'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:84:in
`eval_resource'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:104:in
`block (2 levels) in evaluate'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/util.rb:490:in
`block in thinmark'
/usr/local/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/util.rb:489:in
`thinmark'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:104:in
`block in evaluate'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:386:in
`traverse'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/transaction.rb:99:in
`evaluate'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/resource/catalog.rb:141:in
`apply'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/configurer.rb:122:in
`block in retrieve_and_apply_catalog'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/util.rb:160:in
`block in benchmark'
/usr/local/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/util.rb:159:in
`benchmark'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/configurer.rb:121:in
`retrieve_and_apply_catalog'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/configurer.rb:152:in
`run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:43:in
`block (4 levels) in run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent/locker.rb:21:in
`lock'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:43:in
`block (3 levels) in run'
/usr/local/lib/ruby/1.9.1/sync.rb:225:in `sync_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:43:in
`block (2 levels) in run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:95:in
`with_client'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:41:in
`block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:172:in
`call'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:172:in
`controlled_run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/agent.rb:39:in
`run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application/agent.rb:337:in
`onetime'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application/agent.rb:311:in
`run_command'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:309:in
`block (2 levels) in run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:416:in
`hook'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:309:in
`block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:407:in
`exit_on_fail'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/lib/puppet/application.rb:309:in
`run'
/usr/local/lib/ruby/gems/1.9.1/gems/puppet-2.7.18/bin/puppetd:4:in `<top
(required)>'
/usr/local/bin/puppetd:19:in `load'
/usr/local/bin/puppetd:19:in `<main>'
err: /Stage[main]/Ih-default/Ssh-client[ih]/Service[ssh]: Could not
evaluate: undefined method `each' for #<String:0x0000000434d380>
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/status ssh'
debug: Service[ssh](provider=upstart): Executing '/sbin/stop ssh'
debug: Service[ssh](provider=upstart): Executing '/sbin/start ssh'
Anyone have any suggestions?
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.