Issue #3004 has been updated by Nobuchika Tanaka.
I'm in trouble because of this bug.
I try a puppet_3004.diff patch, but this doesn't work well in below two cases.
So I report that two cases.
1.When set "ensure => halt".
I create a manifest file to stop zone like this.
<pre>
zone {
'aaa13056':
ensure => halt,
}
</pre>
This makes following error.
<pre>
Mar 25 17:42:34 yto13056 puppetd[2905]: [ID 702911 daemon.error]
(//zone/Zone[aaa13056]/ensure) change from configured to halt failed:
comparison of Fixnum with nil failed
</pre>
2.When zone status is unchanged, Puppet will zone status meaninglessly.
Firstly I apply manifest that is defined "ensure => installed".(This works
well.)
Secondly I apply same manifest file then Puppet will zone status in spite of
unchanged zone status.
<pre>
Mar 25 17:59:15 yto13056 puppetd[2905]: [ID 702911 daemon.notice]
(//zone/Zone[aaa13056]/ensure) ensure changed 'installed' to 'installed'
</pre>
----------------------------------------
Bug #3004: zone resource on Solaris tries to change from 'running to running'
and fails miserably
http://projects.puppetlabs.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://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.