Issue #5876 has been updated by Charlie Sharpsteen.

Target version set to 3.x

Re-targeting at 3.x due to the number of duplicates and watchers.

----------------------------------------
Bug #5876: Require and Subscribe on the same refreshonly exec doesnt work
https://projects.puppetlabs.com/issues/5876#change-89956

* Author: R.I. Pienaar
* Status: Needs More Information
* Priority: Normal
* Assignee: Nick Lewis
* Category: exec
* Target version: 3.x
* Affected Puppet version: 0.25.4
* Keywords: customer
* 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: &lt; fail :( &gt;
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to