Handling of configuration conflicts during upgrade (was: Re: [10.04 64bit])

Clint Byrum clint at ubuntu.com
Mon Apr 18 23:51:04 UTC 2011


Excerpts from Etienne Goyer's message of Mon Apr 18 10:52:25 -0700 2011:
> On 11-04-18 01:27 PM, Clint Byrum wrote:
> > The issue is that you have changed these files from the defaults. The
> > package maintainers may have made a change to the way the package works
> > that is incompatible with your changes, so its important to see those
> > differences and *decide* whether to keep your config file or merge their
> > changes into it (or just take theirs).
> 
> A bit off-topic, but this is a recurring problem when upgrading, and
> it's only worst when doing LTS-to-LTS upgrade (since there's a lot more
> default configuration changes).  It makes automatic non-interactive
> upgrade challenging in certain situation.
> 
> I see two things that could help that:
> 
> 1. Having a tool that check ahead of time for these conflicts.  That
> way, you can plan the upgrade accordingly.
> 
> 2. The ability to specify --force-confdef and --force-confnew on a
> per-package basis (so that you can get the maintainer's version for some
> packages, and keep your local changes for others).
> 
> 
> Thoughts?  (surely this is not the right place to discuss that, though)
> 

The real issue is that its a 2-way merge and not a 3-way merge. dpkg only
has whats on disk now, and what it is trying to write. It does not keep a
copy of the original config files so it can show you the changes in the
context of changes that you, the user made, to the common ancestor. If
it did that, it could probably automerge most of the time.

That said, this is what configuration management is built for. The
problem of doing this per-server is impossible to solve without
manual merging. With config management, you simply need to maintain the
pro-active changes you need to make, and apply them when appropriate. In
this way, you would do your upgrade with --force-confnew and then re-run
your configuration management to make all of the necessary changes to
turn it back into your server.

If you're not using config management by now, you are just wasting your
sysadmin time.




More information about the ubuntu-server mailing list