Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Dorin Pleava updated an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Dorin Pleava Fix Version/s: PUP 6.25.0 Add Comment This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97) -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.410026.1628169495000.139927.1632747180087%40Atlassian.JIRA.
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Claire Cadman updated an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Claire Cadman Labels: doc-reviewed Add Comment This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97) -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.410026.1628169495000.106205.1628770020028%40Atlassian.JIRA.
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Gheorghe Popescu updated an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Gheorghe Popescu Fix Version/s: PUP 7.10.0 Add Comment This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97) -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.410026.1628169495000.106125.1628757660136%40Atlassian.JIRA.
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Gabriel Nagy updated an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Gabriel Nagy Taken from: https://groups.google.com/g/puppet-users/c/axT5CfVNDXUThe {{ -- noop}} flag tells Puppet to determine which resources are out of sync, and to report them without actually synchronizing them. The 'onlyif' and 'unless' commands of an Exec are used in the process of determining whether the Exec is already in sync, therefore they must be run during a {{--noop}} Puppet run. The synchronization of an out-of-sync Exec resource involves only running the command given by its 'command' property, so that's the only part that {{--noop}} prevents. Up until https://github.com/puppetlabs/puppet/commit/c127bcb1f6b3d0a0e7b9122352162528fbb65b6c {{onlyif}} and {{unless}} commands did not run in the specified {{cwd}}, which might have given the wrong impression that {{noop}} also applies to those parameters. Applying something like the following manifest would have worked prior to that commit:{code}exec { "hello world": cwd => '/home/gabi/tmp/abc', command => "/bin/echo hello world", _onlyif_ => "/bin/test -e asd",}{code}After puppet 5.5.7 applying the manifest above with {{--noop}} fails with the following error (provided that the cwd does not exist):{code}Error: /Stage[main]/Main/Exec[hello world]: Could not evaluate: Working directory /home/gabi/tmp/abc does not exist!{code}This is expected behavior since {{noop}} does not prevent {{onlyif}} and {{unless}} from being run. We should document this behavior. Add Comment
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Gabriel Nagy updated an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Gabriel Nagy Taken from: https://groups.google.com/g/puppet-users/c/axT5CfVNDXUThe {{--noop}} flag tells Puppet to determine which resources are out of sync, and to report them without actually synchronizing them. The 'onlyif' and 'unless' commands of an Exec are used in the process of determining whether the Exec is already in sync, therefore they must be run during a {{--noop}} Puppet run. The synchronization of an out-of-sync Exec resource involves only running the command given by its 'command' property, so that's the only part that {{--noop}} prevents. Up until https://github.com/puppetlabs/puppet/commit/c127bcb1f6b3d0a0e7b9122352162528fbb65b6c {{onlyif}} and {{unless}} commands did not run in the specified {{cwd}}, which might have given the wrong impression that {{noop}} also applies to those parameters. Applying something like the following manifest would have worked prior to that commit:{code}exec { "hello world": cwd => '/home/gabi/tmp/abc', command => "/bin/echo hello world", _onlyif_ => "/bin/test -e asd",}{code}After puppet 5.5.7 applying the manifest above with {{--noop}} fails with the following error (provided that the cwd does not exist):{code}Error: /Stage[main]/Main/Exec[hello world]: Could not evaluate: Working directory /home/gabi/tmp/abc does not exist!{code}This is expected behavior since {{noop}} does not prevent {{onlyif}} and {{unless}} from being run. We should document this behavior. Add Comment
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Gabriel Nagy assigned an issue to Gabriel Nagy Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Change By: Gabriel Nagy Assignee: Gabriel Nagy Add Comment This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97) -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.410026.1628169495000.100058.1628169540230%40Atlassian.JIRA.
Jira (PUP-11199) Document exec type's 'onlyif' and 'unless' commands behavior with --noop
Title: Message Title Gabriel Nagy created an issue Puppet / PUP-11199 Document exec type's 'onlyif' and 'unless' commands behavior with --noop Issue Type: Improvement Assignee: Unassigned Created: 2021/08/05 6:18 AM Priority: Normal Reporter: Gabriel Nagy Add Comment This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97) -- 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 view this discussion on the web visit