[augeas-devel] [Fwd: [Puppet Users] Re: Augeas and grub.conf]

David Lutterkort lutter at redhat.com
Sat Aug 8 00:43:37 UTC 2009


On Fri, 2009-08-07 at 12:09 +1000, Matthew Palmer wrote:
> On Thu, Aug 06, 2009 at 05:49:19PM -0700, David Lutterkort wrote:
> > I am not a big fan of putting a notion of 'symlink' into the tree data
> > structure since it complicates internals considerably (dangling symlinks
> > after you delete the target file in the tree, evaluation of path
> > expressions etc.) and doesn't solve the issue at hand any better, since
> > there's no /etc/grub.conf in Debian anyway.
> 
> You're never going to be able to solve the "different files in different
> distros" problem in general, so I wouldn't try (leave that for Puppet or
> whatever).  Dangling symlinks are a problem, but how are you dealing with
> files disappearing out from underneath Augeas in the middle of a run at the
> moment?  Presumably similar handling could be performed for symlinks.

Files disappearing isn't a big deal - if you save modifications, the
file would be created as if you had created a brandnew tree for it.

And it's not the dangling symlinks in the fs that makes this
complicated, but the notion of symlink in the tree and making sure all
the places where a dangling 'tree symlink' could cause trouble are
properly handled.

> > I'd much favor a solution that would add some sort of bidirectional tree
> > <-> tree transform that simply renames the tree so that it always
> > appears in the same place, no matter what OS you're on. But that's not
> > all that simple, either.
> 
> Especially when you consider that there's plenty of lenses that don't have
> the concept of a "single file", like the ones that handle /etc/sysconfig or
> /etc/default files... I think that way lies madness.

The lens always acts on a single file, the transform might deal with a
bunch of files. For some sort of rename tree <-> tree lens you'd want to
make sure it only ever deals with one file at a time.

David





More information about the augeas-devel mailing list