Issue #3004 has been updated by Bryan Allen. File puppet_3004.diff added
Patch attached. ---------------------------------------- Bug #3004: zone resource on Solaris tries to change from 'running to running' and fails miserably http://projects.reductivelabs.com/issues/3004 Author: Kaspar Schiess Status: Accepted Priority: Normal Assigned to: Category: Solaris Target version: 0.25.5 Affected version: 0.25.1 Keywords: zone Branch: our recipe looks something like this: zone { 'example': ensure => running, ... other stuff; } The failure we get with this is: debug: //Node[deimos.CENSORED]/Giuz_solaris_zone[CENSORED]/Zone[CENSORED]: Changing ensure debug: //Node[deimos.CENSORED]/Giuz_solaris_zone[CENSORED]/Zone[CENSORED]: 1 change(s) /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/zone.rb:186:in `<' /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/zone.rb:186:in `up?' /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/zone.rb:155:in `sync' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction/change.rb:54:in `go' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction/change.rb:72:in `forward' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:118:in `apply_changes' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `collect' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `apply_changes' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:83:in `apply' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:249:in `eval_children_and_apply_resource' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:417:in `thinmark' /opt/csw/lib/ruby/1.8/benchmark.rb:308:in `realtime' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:416:in `thinmark' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:248:in `eval_children_and_apply_resource' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:205:in `eval_resource' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:294:in `evaluate' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:417:in `thinmark' /opt/csw/lib/ruby/1.8/benchmark.rb:308:in `realtime' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:416:in `thinmark' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:293:in `evaluate' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:287:in `collect' /opt/csw/lib/ruby/site_ruby/1.8/puppet/transaction.rb:287:in `evaluate' /opt/csw/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:142:in `apply' /opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:177:in `benchmark' /opt/csw/lib/ruby/1.8/benchmark.rb:308:in `realtime' /opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:176:in `benchmark' /opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:151:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run' /opt/csw/lib/ruby/1.8/sync.rb:230:in `synchronize' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:130:in `with_client' /opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:51:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application/puppetd.rb:103:in `onetime' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `send' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `run_command' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `exit_on_fail' /opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run' /opt/csw/sbin/puppetd:159 err: //Node[deimos.CENSORED]/Giuz_solaris_zone[CENSORED]/Zone[CENSORED]/ensure: change from running to running failed: comparison of Fixnum with nil failed This fails because 'should' is 'running' (the string), where current_value is :running (the ruby symbol). The same applies to virtually every other value we set with ensure =>, since whatever we set it to, it is returned as a string and the solaris provider works with symbols internally. Implementing something like def should super.to_sym end makes it work, although I think the implementation of zone.rb should be more thoroughly modernized... Normally, I would file a patch, but I cannot seem to get rspec tests to work fully (always something failing). We're working around this by removing the ensure=>something line altogether and relying on the default of :running, but that is probably unhealthy in the long run. -- 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://reductivelabs.com/redmine/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.
