[RFE] Configure apt with Dpkg option to force confold

Bug #1817121 reported by Drew Freiberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apt layer
New
Undecided
Unassigned

Bug Description

There are several times I've seen charms fail to upgrade or install packages on a system due to that package, or any of it's dependencies, having a config file update requiring user intervention.

I'd like to request an option in the apt layer to setup an apt.conf.d entry to set

DPkg::options { "--force-confold"; };

...or confdef or confnew...

I suggest defaulting to confold as the config files are typically managed by the charms (think graylog.conf, nova.conf, ceph.conf), and I feel if this assumption of primarily (if not exclusively) charm-managed config files triggering this state is true, charm-managed files should be trusted over new package-maintainer default configs.

Revision history for this message
Stuart Bishop (stub) wrote :

This sounds like a good idea.

I think it may already be possible to turn this on on a package by package basis, using the options parameter to queue_install in lib/charms/apt.py. I haven't tried it, and don't even know the correct sytax. Making it easier to do this on a package by package basis would be a good feature.

Turning it on globally also seems like a good feature, and requires less thought on design. It would be easy enough to create a layer option to allow the default to be changed. It will create another point of contention between principal and subordinate charms, if they have differing config. There is no real solution when this conflict occurs, so I think package by package would be a better option, as it makes setting conflicts less likely to occur, as well as letting the charm specify which packages it is modifying config, and which packages it is using unmodified.

If we add a global option, is is debatable if it should be enabled by default. I don't think there is a correct answer, so we will need to go with the less wrong answer.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.