unattended upgrade failing due to incorrectly detected conffile prompt due to "newconffile" line

Bug #936870 reported by Tim Cutts
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Brian Murray
Precise
Fix Released
Medium
Brian Murray

Bug Description

[Impact]
It is possible for unattended-upgrade to be unsuccessful when encountering some packages and conffiles in them. However, manual installation of the packages is possible without encountering a conffile prompt.

[Test Case]
A specific package which creates this situation has not been found so a regression test of installing Precise / Lucid, then instal ling unattended-upgrades and running it manually (unattended-upgrade --debug) should be sufficient.

[Regression Potential]
This fix has been in quantal since June 2012 with no regressions reported.

On severa hundredl of our Ubuntu machines, we have unattended upgrades active. Over the weekend, this started reporting on all machines with dhcpcd installed that it could not upgrade that package due to a conffile prompt. This looks very similar to #773007 and #336558, both of which are marked as fixed.

On one of the machines, I've run unattended-upgrades --debug, and attached the output below. The MD5 sums seem to match (which is a relief - I didn't think I was modifying these files), so I don't know why the conffile prompt is being detected. If I run apt-get safe-upgrade on its own, it successfully upgrades the package with no prompting.

ProblemType: BugDistroRelease: Ubuntu 10.04
Package: unattended-upgrades 0.55ubuntu7
ProcVersionSignature: Ubuntu 2.6.32-37.81-server 2.6.32.49+drm33.21
Uname: Linux 2.6.32-37-server x86_64
Architecture: amd64
Date: Mon Feb 20 10:06:00 2012InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
PackageArchitecture: all
ProcEnviron:
 SHELL=/usr/local/bin/bash
 PATH=(custom, no user)
 LANG=en_GB.UTF-8SourcePackage: unattended-upgrades

Revision history for this message
Tim Cutts (timc) wrote :
Revision history for this message
Tim Cutts (timc) wrote :

Trying that attachment again

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport and sorry for my slow reply.

The interessting bit in the report is:

conffile line: /etc/default/dhcpcd newconffile
current md5: 5985e1dff4832ed1fef727da4809202f
pkg_md5sum: 5985e1dff4832ed1fef727da4809202f

i.e. the "/etc/default/dhcpcd newconffile" line - the code needs to specialcase the "newconffile" and ignore that.

summary: unattended upgrade failing due to incorrectly detected conffile prompt
+ due to "newconffile" line
Changed in unattended-upgrades (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
milestone: none → precise-updates
Revision history for this message
Michael Vogt (mvo) wrote :

What is confusing is that I see the following in /var/lib/dpkg/status:

Package: dhcpcd
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 196
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 1:3.2.3-5
Replaces: dhcpcd-sv
Provides: dhcp-client
Depends: libc6 (>= 2.7), bsdutils (>= 2.11n), procps
Conflicts: dhcp-client, dhcpcd-sv, ifupdown (<< 0.6.4-4)
Conffiles:
 /etc/dhcpcd.sh b5e7e78f7ae70a5d6e6619d58b477764
 /etc/default/dhcpcd 5985e1dff4832ed1fef727da4809202f
 /etc/default/dhcpcd newconffile
 /etc/dhcpcd.sh newconffile
Description: DHCP client for automatically configuring IPv4 networking
 Simple configuration: supports executions of a script when the
 IP address changes.
Original-Maintainer: Simon Kelley <email address hidden>

I.e. the Conffiles contains a md5sum and a "flag"

Revision history for this message
Tim Cutts (timc) wrote :

Yep, it's very odd. I don't know how the status file gets into that state. It might be a bug in dpkg. dhcpcd wasn't the only package affected - I did see it on one other (can't remember which, now - I put cfengine code in place on our systems to spot this problem and sanitise the status file, so the evidence isn't there any more)

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Tim! I will try to get some feeback from the dpkg developers on this, for now I will make unattended-upgrades ignore lines with newconffile

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.77

---------------
unattended-upgrades (0.77) unstable; urgency=low

  * unattended-upgrade:
    - ignore md5sum "newconffile" (LP: #936870)
    - simply ignore SIGHUP instead of the setsid() magic
    - redirect ionice stderr output to /dev/null to avoid
      showing a error in a OpenVZ env (closes: #675021)
  * unattended-upgrade-shutdown:
    - be robust about import apt_pkg failures (LP: #808449), e.g.
      during upgrades
    - log when install finished to help track down LP #434835
    - do not log to syslog anymore as this *might* block and
      could cause LP #434835 and was not working in most cases
      as syslog was killed before it could log
    - log instead to /var/log/unattended-upgrades-shutdown.log
      to help track down LP #434835
  * debian/unattended-upgrades.init:
    - add Required-{Start,Stop}: $local_fs to help track down LP #434835
  * po/fr.po:
    - updated french translation (closes: #675916)

 -- Michael Vogt <email address hidden> Mon, 11 Jun 2012 16:57:33 +0200

Changed in unattended-upgrades (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
richud (richud.com) wrote :

This *still* isnt fixed

$ cat unattended-upgrades.log
2012-07-31 18:20:57,699 INFO Initial blacklisted packages:
2012-07-31 18:20:57,700 INFO Starting unattended upgrades script
2012-07-31 18:20:57,700 INFO Allowed origins are: ['o=Ubuntu,a=precise', 'o=Ubuntu,a=precise-security', 'o=Ubuntu,a=precise-updates', 'o=Canonical,a=precise', 'o=Oracle Corporation,a=', 'o=LP-PPA-libreoffice,a=precise', 'o=LP-PPA-app-review-board,a=precise']
2012-07-31 18:21:17,591 WARNING Package 'libqtcore4' has conffile prompt and needs to be upgraded manually
2012-07-31 18:21:19,005 INFO package 'libqt4-dbus' not upgraded
2012-07-31 18:21:20,382 INFO package 'libqt4-declarative' not upgraded
2012-07-31 18:21:21,750 INFO package 'libqt4-designer' not upgraded
2012-07-31 18:21:23,090 INFO package 'libqt4-dev' not upgraded
2012-07-31 18:21:24,447 INFO package 'libqt4-help' not upgraded
2012-07-31 18:21:25,800 INFO package 'libqt4-network' not upgraded
2012-07-31 18:21:27,152 INFO package 'libqt4-opengl' not upgraded
2012-07-31 18:21:28,486 INFO package 'libqt4-opengl-dev' not upgraded
2012-07-31 18:21:29,833 INFO package 'libqt4-qt3support' not upgraded
2012-07-31 18:21:31,182 INFO package 'libqt4-script' not upgraded
2012-07-31 18:21:32,529 INFO package 'libqt4-scripttools' not upgraded
2012-07-31 18:21:33,876 INFO package 'libqt4-sql' not upgraded
2012-07-31 18:21:35,233 INFO package 'libqt4-sql-sqlite' not upgraded
2012-07-31 18:21:36,582 INFO package 'libqt4-svg' not upgraded
2012-07-31 18:21:37,935 INFO package 'libqt4-test' not upgraded
2012-07-31 18:21:39,288 INFO package 'libqt4-xml' not upgraded
2012-07-31 18:21:40,637 INFO package 'libqt4-xmlpatterns' not upgraded
2012-07-31 18:21:41,992 INFO package 'libqtcore4' not upgraded
2012-07-31 18:21:43,347 INFO package 'libqtgui4' not upgraded
2012-07-31 18:21:44,702 INFO package 'qdbus' not upgraded
2012-07-31 18:21:46,064 INFO package 'qt4-linguist-tools' not upgraded
2012-07-31 18:21:47,419 INFO package 'qt4-qmake' not upgraded
2012-07-31 18:21:48,258 INFO Packages that are upgraded:
rfm6@UbuntuSSDx64:/tmp/unattended-upgrades$

Revision history for this message
Brian Murray (brian-murray) wrote :

Right this fix only made it into quantal and it needs to be released as an SRU for precise.

Revision history for this message
Tim Cutts (timc) wrote : Re: [Bug 936870] unattended upgrade failing due to incorrectly detected conffile prompt due to "newconffile" line

On 7 Nov 2012, at 15:57, Brian Murray <email address hidden> wrote:

> Right this fix only made it into quantal and it needs to be released as
> an SRU for precise.

And Lucid as well? Lucid is still a supported LTS release, is it not?

Tim

Revision history for this message
Brian Murray (brian-murray) wrote :

Tim, yes we should fix this in Lucid also. I'm happy to do the uploads to the -proposed queue to fix this bug, however the bug report could use a test case so we can verify that the fix in fact works. Do you happen to know of a specific way to trigger this bug? Thanks in advance.

Changed in unattended-upgrades (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Tim Cutts (timc) wrote :

Unfortunately not - I never found out how the status file got into that state. I suppose you could simulate my original report by force-downgrading to an old version of some package (say the DHCP client if you want to use exactly the situation I had), and then hand editing the status file into the state which I found in my original bug report.

description: updated
Changed in unattended-upgrades (Ubuntu Precise):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Changed in unattended-upgrades (Ubuntu Lucid):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Tim, or anyone else affected,

Accepted unattended-upgrades into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unattended-upgrades/0.76ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unattended-upgrades (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in unattended-upgrades (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hello Tim, or anyone else affected,

Accepted unattended-upgrades into lucid-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unattended-upgrades/0.55ubuntu8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Brian Murray (brian-murray) wrote :

Using unattended-upgrades version 0.55ubuntu8 from lucid-proposed on an older Lucid system I successfully installed 175 updates.

tags: added: verification-done-lucid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.55ubuntu8

---------------
unattended-upgrades (0.55ubuntu8) lucid-proposed; urgency=low

  * unattended-upgrade: ignore md5sum "newconffile" (LP: #936870)
 -- Brian Murray <email address hidden> Tue, 13 Nov 2012 09:39:12 -0800

Changed in unattended-upgrades (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

On a 12.04.1 server system I installed unattended-upgrades version 0.76ubuntu1 from precise-proposed, ran unattended-upgrades and successfully installed 31 updates without any issue.

tags: added: verification-done-precise
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.76ubuntu1

---------------
unattended-upgrades (0.76ubuntu1) precise-proposed; urgency=low

  * unattended-upgrade: ignore md5sum "newconffile" (LP: #936870)
 -- Brian Murray <email address hidden> Thu, 08 Nov 2012 11:52:39 -0800

Changed in unattended-upgrades (Ubuntu Precise):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in unattended-upgrades (Ubuntu):
milestone: precise-updates → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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