Issue #11988 has been updated by Jeff McCune.
# puppet-dev conversation # <pre> Dominic: jmccune: around? [10:56pm] jmccune: Dominic: Yessir [10:56pm] jmccune: What's up? [10:56pm] Dominic: ah good. Just caught your update before I was heading off. [10:57pm] jmccune: Update on what? [10:57pm] Dominic: #11988 [10:57pm] gepetto: Dominic: #11988 is http://projects.puppetlabs.com/issues/show/11988 "Puppet - Bug #11988: Augeas provider can clobber symlinks. It has a status of Accepted and is assigned to Dominic Cleal" [10:57pm] jmccune: Ah yeah [10:57pm] jmccune: There's a bit more information, the proposed work around can't work unless the grub lens in our PE packages are updated [10:57pm] Dominic: I think you could squeeze in the use of SAVE_BACKUP without significant refactoring, though I'll admit none of it's very pretty [10:58pm] Dominic: oh? [10:58pm] jmccune: Well, the grub lens doesn't work with /boot/grub/grub.conf [10:58pm] jmccune: Only /etc/grub.conf [10:59pm] jmccune: Dominic: Yeah, we could but this is something we'd like to fix [10:59pm] lak left the chat room. (Quit: Leaving.) [10:59pm] Dominic: (the provider used to fit the retrieve/sync pattern much better, then it was optimised as part of the #2728 ticket to rely on this side effect) [10:59pm] gepetto: Dominic: #2728 is http://projects.puppetlabs.com/issues/show/2728 "Puppet - Feature #2728: augeas show print file changes as applicable via --show_diff. It has a status of Closed and is assigned to Bryan Kearney" [10:59pm] jmccune: While we're in there. [10:59pm] jmccune: Right, that makes sense [11:00pm] Dominic: the lens will work with just /etc/grub.conf, it'll follow through and load whatever it's pointing at [11:00pm] jmccune: It just seems like the right thing to do is use NEWFILE for the retrieve method [11:00pm] jmccune: And BACKUP for the sync method [11:01pm] jmccune: Dominic: That's correct, but the augnew file is in the wrong directory then [11:01pm] Dominic: agreed, that's more natural, though it means running the provider twice - which can be slow [11:01pm] jmccune: Dominic: We want to get away from only running the provider once. [11:01pm] jmccune: Regardless [11:01pm] Dominic: ok [11:02pm] jmccune: Because if we don't we're going to have to re-implement the Augeas permissions management [11:02pm] jmccune: As you mentioned [11:02pm] jmccune: It would be ideal [11:02pm] jmccune: If we could always use the new file save mode [11:03pm] jmccune: And rely on augeas to set the permissions of the new file to match the source file. [11:03pm] jmccune: Then we can simply rename it into place from Puppet [11:03pm] jmccune: From the sync method [11:03pm] jmccune: We can't do that today because the rename would cross a filesystem boundary [11:05pm] Dominic: yup, though if BACKUP was used from the retrieve method, then the file itself would be updated solely by Augeas, no rename required [11:05pm] jmccune: Dominic: But that has the obvious problem of making changes while trying to figure out if changes need to be made [11:06pm] jmccune: Or do I misunderstand backup? [11:06pm] jmccune: Doesn't it store the original file in the backup and modify the target file? [11:06pm] Dominic: Augeas will only write and "save" the file if it's changed [11:06pm] Dominic: no, you understand backup correctly, it's just that Augeas will only save if needed [11:06pm] jmccune: Dominic: Right, so what if we're running in Puppet noon mode? [11:06pm] jmccune: s/noon/noop/ [11:06pm] Dominic: it's ugly, but you could flip the logic to use NEWFILE if resource.noop? [11:07pm] jmccune: Right, that's the point when I said to myself "This feels like a refactor" [11:07pm] Dominic: [11:07pm] jmccune: [11:07pm] Dominic: you might want to look at the pre-2728 code, that was closer to Puppet's normal retrieve/sync style [11:08pm] Dominic: it used to use Augeas' noop mode (introduced for Puppet) </pre> ---------------------------------------- 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.
