Issue #13126 has been updated by Ken Barber.

Well -- semantically according to the docs the state of a symlink target is 
irrelevant when you talk about 'creates' function ... at least the state of the 
target anyway. It talks about "If this parameter is provided, then the command 
will only be run if the specified file does not exist". Well in a broken link 
case, the file _does_ exist, the file being a symlink - the other end of it is 
irrelevant.

I doubt anyone would be using the broken state of a link to detect if a script 
should run or not ... and if they are, there are possible work-arounds anyway 
for this odd case - such as pointing at the real file/dir instead perhaps? or 
use "stat -L <file>" in an unless clause? I guess this is my only fear - if 
someone is using this broken state in a legit way. It seems to me and my simple 
mind however this use case is more likely.
----------------------------------------
Bug #13126: Exec's 'creates' attribute follows symlinks and treats broken links 
as missing files
https://projects.puppetlabs.com/issues/13126#change-57842

Author: Peter Bukowinski
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Kelsey Hightower
Category: exec
Target version: 2.7.x
Affected Puppet version: 
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/588


When an `exec` resource's `creates` attribute points to a broken symlink, the 
target is treated as missing and does not prevent the exec block from running. 
The following code will succeed on the first run, then fail on subsequent runs 
because it's trying to recreate an existing symlink.

<pre>
puppet apply -e 'exec { "/bin/ln -s /tmp/no.file.here /tmp/test.link": creates 
=> "/tmp/test.link" }'
</pre>

If this is the intended behavior, I'd like to understand the reasoning behind 
it.


-- 
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.

Reply via email to