Issue #11988 has been updated by Dominic Cleal.
Status changed from Needs More Information to Accepted
Jeff McCune wrote:
> Dominic, if you could work on a patch that'd be awesome. If you don't have
> the bandwidth I'm happy to take it on.
I can take a look on Friday hopefully.
> In the meantime, if you could paste a sample manifest that triggers this
> issue into the ticket that will help tremendously. I was about to cook up
> something that reproduces the issue, but it might not actually be the same
> problem you're running into.
Here's an example manifest, store in `11988_symlink.pp`:
augeas { "11988_symlink":
root => "/tmp/symlink",
context => "/files/etc/grub.conf",
changes => "set timeout 2",
}
And then to reproduce it:
$ mkdir -p /tmp/symlink/etc
$ echo "timeout 5" > /tmp/symlink/realgrub.conf
$ ln -s ../realgrub.conf /tmp/symlink/etc/grub.conf
$ puppet apply 11988_symlink.pp
notice: /Stage[main]//Augeas[11988_symlink]/returns: executed successfully
notice: Finished catalog run in 0.44 seconds
$ ls -l /tmp/symlink/*
-rw-rw-r--. 1 dcleal dcleal 10 Feb 1 11:08 /tmp/symlink/realgrub.conf
/tmp/symlink/etc:
total 4
-rw-rw-r--. 1 dcleal dcleal 10 Feb 1 11:10 grub.conf
----------------------------------------
Bug #11988: Augeas provider can clobber symlinks
https://projects.puppetlabs.com/issues/11988
Author: Nathan Huff
Status: Accepted
Priority: Normal
Assignee: Dominic Cleal
Category: augeas
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords: augeas
Branch:
If the augeas resource is fed a symlink as the target file and it
makes changes it will overwrite it with a regular file. It creates
and .augnew file and just blindly moves it into place without checking
if the target file was a symlink.
The provider should either check whether the target was a symlink and
dereference it or it should rerun augeas in overwrite mode since augeas does
take care to dereference if necessary.
--
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.