Project

General

Profile

Actions

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.

Status:
Released
Priority:
N/A
Assignee:
Jonathan CLARKE
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #2411: CFEngine doesn't expireafter when installing a packageRejectedActions
Actions #1

Updated by Jonathan CLARKE over 12 years ago

  • Category changed from 14 to System techniques
Actions #2

Updated by Jonathan CLARKE over 12 years ago

This seems related to #2411 - at least, it's the same root problem, but this bug describes a different side of it.

Actions #3

Updated by Jonathan CLARKE over 12 years ago

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

Actions #4

Updated by Jonathan CLARKE over 12 years ago

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

Actions #5

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 0 to 100

Applied in changeset commit:c9e3ccaf9517735c065e078bc352f9093d179819.

Actions #6

Updated by Nicolas CHARLES over 12 years ago

  • Status changed from Pending technical review to Released

This looks valid, thank you Jon

Actions

Also available in: Atom PDF