Issue #5876 has been updated by Jason Slagle.
Came across this class during training here at puppetconf attempting to
validate the sudoers file in an example.
At least 3 seperate people in my class hit this issue - it's very surprising
and frustrating.
+1 on raising the priority back to urgent - this isn't a POLA thing here - it
seems to have been broken and I can't see how fixing it would surprise people?
Here's another simple test case that models what we were doing in class:
<pre>
file{"/tmp/a": ensure=>present, content=>"Test", notify=>Exec['/bin/false']}
exec{"/bin/false": notify => File["/tmp/b"], refreshonly=>true}
file{"/tmp/b": ensure=>present, source=>'/tmp/a', require=>Exec['/bin/false']}
[root@localhost manifests]# puppet apply -v 5876.pp
info: Loading facts in facter_dot_d
info: Applying configuration version '1316532415'
notice: /Stage[main]//File[/tmp/a]/ensure: created
info: /Stage[main]//File[/tmp/a]: Scheduling refresh of Exec[/bin/false]
err: /Stage[main]//Exec[/bin/false]: Failed to call refresh: /bin/false
returned 1 instead of one of [0] at /etc/puppetlabs/puppet/manifests/5876.pp:2
notice: /Stage[main]//File[/tmp/b]/ensure: defined content as
'{md5}0cbc6611f5540bd0809a388dc95a615b'
notice: Finished catalog run in 0.24 seconds
</pre>
----------------------------------------
Bug #5876: Require and Subscribe on the same refreshonly exec doesnt work
https://projects.puppetlabs.com/issues/5876
Author: R.I. Pienaar
Status: Needs Decision
Priority: Normal
Assignee: Nick Lewis
Category:
Target version: 2.6.x
Affected Puppet version: 0.25.4
Keywords:
Branch:
Given this manifest:
<pre>
exec{"moo":
command => "/usr/bin/cowsay 'fail :('",
refreshonly => true,
logoutput => true,
require => Exec["false"],
subscribe => [ File["/tmp/1"], File["/tmp/2"], File["/tmp/3"] ]
}
file{"/tmp/1": content => 1}
file{"/tmp/2": content => 2}
file{"/tmp/3": content => 3}
exec{"false": command => "/bin/false"}
</pre>
The Exec[moo] shouldn't run it requires Exec[false] which will always fail, but
it gets notified by the file resources via its subscribes and then runs anyway
regardless of the state of the required resources.
In version 2.6.5 this might be related to #5670 but I am filing a new bug since
I think its not as this bug is also present in 0.25.x while the one in #5670 is
2.6.x only
<pre>
notice: //File[/tmp/1]/content: defined content as 'unknown checksum'
notice: //File[/tmp/3]/content: defined content as 'unknown checksum'
err: //Exec[false]/returns: change from notrun to 0 failed: /bin/false returned
1 instead of one of [0] at /home/rip/test.pp:12
notice: //File[/tmp/2]/content: defined content as 'unknown checksum'
notice: //Exec[moo]: Dependency exec[/bin/false] has 1 failures
warning: //Exec[moo]: Skipping because of failed dependencies
notice: //Exec[moo]: Triggering 'refresh' from 3 dependencies
notice: //Exec[moo]/returns: _________
notice: //Exec[moo]/returns: < fail :( >
notice: //Exec[moo]/returns: ---------
notice: //Exec[moo]/returns: \ ^__^
notice: //Exec[moo]/returns: \ (oo)\_______
notice: //Exec[moo]/returns: (__)\ )\/\
notice: //Exec[moo]/returns: ||----w |
notice: //Exec[moo]/returns: || ||
</pre>
--
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.