Bug #2478
closed
aptitude seems to ask questions when run via cf-agent, even with settings for "noninteractive" execution
Added by Jonathan CLARKE over 12 years ago.
Updated over 12 years ago.
Category:
System techniques
Description
It seems we saw this when trying to install the munin-node package on Debian Squeeze, with a munin-node.conf file already preset containing just one line like "Allow 1.2.3.4".
Then cf-agent got blocked waiting for a user to answer... In the end, cf-execd killed it.
We should test, and see if this can be reproduced.
- Category changed from 14 to System techniques
This seems related to #2411 - at least, it's the same root problem, but this bug describes a different side of it.
Interestingly, the CFEngine standard library has been updated to pass new arguments to aptitude. I'm not sure if this would solve this problem, but it's worth testing.
Change:
- package_add_command => "/usr/bin/aptitude --assume-yes install";
+ package_add_command => "/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C /usr/bin/aptitude -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef
Full commit: https://github.com/cfengine/copbl/commit/b6c6d7ee59c203d9e92e4010098817a2f12a70df
- Tracker changed from Question to Bug
- Status changed from New to In progress
- Assignee changed from Nicolas PERRON to Jonathan CLARKE
I just tested, and this does not solve the precise problem with the munin-node package on Debian.
However, I found the cause for munin-node's error: if the config file does not contain "background 1", munin-node does not run in the background, and therefore aptitude never returns control to CFEngine. This is a bug in the munin-node packaging, I guess. The work for this is in #2411.
However, the new configuration for aptitude introduced by the CFEngine stdlib does fix aptitude asking questions about replacing config files! Even though we now have the most recent stdlib (see #2599), the Technique that installs packages, applications/aptPackageInstallation does not use the aptitude body from there.
So, we need to port the changes to the body used in that Technique. I'll do it.
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:c9e3ccaf9517735c065e078bc352f9093d179819.
- Status changed from Pending technical review to Released
This looks valid, thank you Jon
Also available in: Atom
PDF