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

Jeff Schroeder jeffschroed at gmail.com
Fri Jun 13 21:31:02 UTC 2008


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.

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 a very difficult problem to solve. If Augeas has solved it, how?
>
> It hasn't really; Augeas doesn't have a way (yet) to couple lens
> definitions to versions of installed software. It simply looks for
> certain files, and if they are there processes them according to a fixed
> definition.
>
> 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 :-)


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

-- 
Jeff Schroeder

Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com




More information about the augeas-devel mailing list