Jira (PUP-2748) require = Exec does not work
Title: Message Title Kurt Wall updated an issue Puppet / PUP-2748 require = Exec does not work Change By: Kurt Wall QA Status: Reviewed Add Comment This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2748) require = Exec does not work
Title: Message Title Kurt Wall updated an issue Puppet / PUP-2748 require = Exec does not work Change By: Kurt Wall QA Risk Assessment Reason: Usererror Add Comment This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2748) require = Exec does not work
Title: Message Title c sights updated an issue Puppet / PUP-2748 require = Exec does not work Change By: c sights Fix Version/s: PUP3.5.1 Add Comment This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2748) require = Exec does not work
Title: Message Title John Bollinger commented on an issue Re: require = Exec does not work You have a misapprehension. Applying a resource involves first checking whether (and in which ways) that resource is already in sync, and then performing whatever actions, if any, are needed to bring it into sync. Resources that are already in sync automatically succeed, an which case other resources that depend on them can be applied. That is what is happening in this case. Specifically, an Exec uses its 'onlyif' parameter (and 'unless' and 'creates') to determine whether it is already in sync, not to determine whether the resource itself succeeds or fails. If an Exec has an 'onlyif' command that produces a false exit status, then the Exec is deemed already in sync, and therefore succeeds without any attempt at running its 'command'. Given the Exec's command being '/bin/true' in the example code, the dependent Notify will always be applied, regardless of any 'onlyif', 'unless', or 'creates'. This is the expected behavior. Add Comment Puppet / PUP-2748 require = Exec does not work Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are applied no matter whether the Exec is applied or not: {noformat} exec { test : path = /bin:/sbin:/usr/bin:/usr/sbin, command = ... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2748) require = Exec does not work
Title: Message Title c sights commented on an issue Re: require = Exec does not work Hmmm, Ok. I think I get it more now. In the second example the Notify requires the Exec and b/c of the onlyif statement Puppet applies the Exec. To apply the Exec, Puppet first checks the onlyif command and determines the the Exec is in sync so does not execute the command. Afterwards the Notify statement is applied. This does not sound quite right. In the second example the command is not executed because of the onlyif statement indicated the Exec was already in sync. But in other cases (case 1): If the Exec were not in sync and the command /bin/true were executed, then the Exec would succeed and the Notify would be allowed to run. Did I get that right? Thanks for the clarification! C. Add Comment Puppet / PUP-2748 require = Exec does not work Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are applied no matter whether the Exec is applied or not: {noformat} exec { test : path = /bin:/sbin:/usr/bin:/usr/sbin, command = ... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2748) require = Exec does not work
Title: Message Title c sights commented on an issue Re: require = Exec does not work Hmmm, Ok. I think I get it more now. In the second example the Notify requires the Exec and b/c of the onlyif statement Puppet applies the Exec. To apply the Exec, Puppet first checks the onlyif command and determines the the Exec is in sync so does not execute the command. Afterwards the Notify statement is applied. This does not sound quite right. In the second example the command is not executed because of the onlyif statement indicated the Exec was already in sync. But in other cases (case 1): If the Exec were not in sync and the command /bin/true were executed, then the Exec would succeed and the Notify would be allowed to run. Did I get that right? Thanks for the clarification! C. Add Comment Puppet / PUP-2748 require = Exec does not work Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are applied no matter whether the Exec is applied or not: {noformat} exec { test : path = /bin:/sbin:/usr/bin:/usr/sbin, command = ... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2748) require = Exec does not work
Title: Message Title John Bollinger commented on an issue Re: require = Exec does not work It sounds like you've got it, but I'm not sure what you mean is not [...] quite right. I anyway suppose you're just remarking that it's different than you expected / hoped. Just in case, here's a summary of the sequence of events during resource application: First example: (a) the Exec's onlyif command is executed, yielding exit status 0 (true) – means the command needs to run to sync the resource; (b) the command is run, yielding exit status 0 (true) – means the resource is successfully applied; (c) the Notify is applied, generating a message in the Puppet log. Second example: (a) the Exec's onlyif command is executed, yielding nonzero exit status (false) – means the resource is already in the target state (therefore successfully applied) thus the command is not run; (b) the Notify is applied, generating a message in the Puppet log. Contrast with the same cases if the Exec's command were instead /bin/false: Alternate first example: (a) the Exec's onlyif command is executed, yielding exit status 0 (true) – means the command needs to run to sync the resource; (b) the command is run, yielding nonzero exit status (false) – means the resource fails; (c) the Notify is skipped because it requires a failed resource. Alternate second example: (a) the Exec's onlyif command is executed, yielding nonzero exit status (false) – means the resource is already in the target state (therefore successfully applied) thus the command is not run; (b) the Notify is applied, generating a message in the Puppet log. [Same as the original second example.] Add Comment Puppet / PUP-2748 require = Exec does not work Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are
Jira (PUP-2748) require = Exec does not work
Title: Message Title c sights commented on an issue Re: require = Exec does not work Hi John, Thanks much! Your examples were very clear, complete and (I think) I understand fully now. Have a good day! Chad. Add Comment Puppet / PUP-2748 require = Exec does not work Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are applied no matter whether the Exec is applied or not: {noformat} exec { test : path = /bin:/sbin:/usr/bin:/usr/sbin, command = ... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2748) require = Exec does not work
Title: Message Title c sights created an issue Puppet / PUP-2748 require = Exec does not work Issue Type: Bug Affects Versions: 3.5.1 Assignee: Unassigned Created: 10/Jun/14 10:05 AM Environment: Linux Priority: Normal Reporter: c sights Original Estimate: 0 minutes Remaining Estimate: 0 minutes Puppet 3.5.1 resources types File and Notify cannot successfully require an Exec. The File or Notified are applied no matter whether the Exec is applied or not: exec { test : path = /bin:/sbin:/usr/bin:/usr/sbin, command = /bin/true, _onlyif_ = test -e /etc/, } notify { test executed : require = Exec[test], } Produces output:Info: Applying configuration
Jira (PUP-2748) require = Exec does not work
Title: Message Title Josh Cooper updated an issue Puppet / PUP-2748 require = Exec does not work Change By: Josh Cooper Puppet3.5.1resourcestypesFileandNotifycannotsuccessfullyrequireanExec.TheFileorNotifiedareappliednomatterwhethertheExecisappliedornot: {noformat} exec{test:path=/bin:/sbin:/usr/bin:/usr/sbin,command=/bin/true,onlyif=test-e/etc/,}notify{testexecuted:require=Exec[test],} {noformat} Producesoutput: {noformat} Info:Applyingconfigurationversion'1402419467'Notice:/Stage[main]/Desktops/Exec[test]/returns:executedsuccessfullyNotice:testexecutedNotice:/Stage[main]/Desktops/Notify[testexecuted]/message:defined'message'as'testexecuted'Notice:Finishedcatalogrunin4.14seconds {noformat} ThatisOK.Thiscode {noformat} exec{test:path=/bin:/sbin:/usr/bin:/usr/sbin,command=/bin/true,onlyif=test-e/doesnotexist,}notify{testexecuted:require=Exec[test],} {noformat} producesthisoutput: {noformat} Info:Applyingconfigurationversion'1402419552'Notice:testexecutedNotice:/Stage[main]/Desktops/Notify[testexecuted]/message:defined'message'as'testexecuted'Notice:Finishedcatalogrunin4.02seconds {noformat} NotifyappliedeventhoughExecisnot!Inbothcasesnotifyisapplied,butinoneExecisappliedandtheotherExecisnot,eventhoughthenotifyrequirestheExec. Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit