[augeas-devel] OT: How do Augeas lenses deal with incompatible config file changes on upgrade?

David Lutterkort dlutter at redhat.com
Mon Jun 16 17:17:24 UTC 2008


On Fri, 2008-06-13 at 14:31 -0700, Jeff Schroeder wrote:
> On Fri, Jun 13, 2008 at 2:13 PM, David Lutterkort <dlutter at redhat.com> wrote:
> > On Fri, 2008-06-13 at 13:07 -0700, Jeff Schroeder wrote:
> >> How does Augeas deal with something like squid where the config file
> >> will change in incompatible ways?
> >> Some of the directives in the rhel4 squid vs rhel5 change and are not
> >> backwards compatible.
> >
> > What exactly are the differences ? Is it possible to detect what version
> > a file is for just from looking at the config file ?
> 
> The example for this will be squid 2.5 in rhel4 vs squid 2.6 in rhel5.
> This link summarizes the changes.
> http://ftp.iasi.roedu.net/mirrors/ftp.squid-cache.org/squid-2/STABLE/squid-2.6.STABLE5-RELEASENOTES.html#s2
> 
> Squid 2.5 valid directives:
> httpd_accel_host virtual
> httpd_accel_port 80
> httpd_accel_with_proxy on
> httpd_accel_uses_host_header on
> 
> Squid 2.6 valid directives:
> http_port 3128 transparent
> http_port 80 vhost
> 
> Most of the other directives are exactly the same, but there might
> have been something else. That
> was done several months ago and I don't work there anymore.

Besides writing separate lenses to deal with the two different formats,
there's always the option to write one lens that handles the options of
both together. Of course, that pushes the burden of validating that you
are producing a correct config file into the code using Augeas.

> The same could also be said about the newest Apache version where the
> module names change.
> Here is a quick example off the top of my head.
> Apache 2.0 --> mod_auth_ldap
> Apache 2.2 --> mod_authnz_ldap

This is less critical, since it doesn't change the directives that are
valid in httpd.conf.

> > The simplest way to address it would be for squid to ship the
> > appropriate lens definition for each version. With that, the squid
> > package would install the right squid.aug into /usr/share/augeas/lenses.
> So when does the bugfest begin :-)

Right after somebody writes a lens for either of the squid formats ;)

> > Even more difficult is the question of how to get from an 'old' squid
> > config file to a 'new' squid config file. It would be possible to
> > address that with Augeas, and a bit of copying files around, but it's
> > not something anybody has looked at in much detail.
> But it seems like a valid use case for Augeas. Especially on debian based
> distributions where dist-upgrades are often encouraged from release to release.
> If this technically possible without nasty hacks we should "do the
> right thing TM".

I think at this point, it mostly requires somebody taking the time and
effort to work on a squid lens.

David






More information about the augeas-devel mailing list