daily unattended upgrade does not recover from interrupted dpkg run (regression)

Bug #1731636 reported by Ernst Kloppenburg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

ever since the daily unattended upgrade is run via systemd timers it does no longer recover from interrupted dpkg runs

in /usr/lib/apt/apt.systemd.daily, before the actual unattended-upgrade script is called, there is a call to
   apt-get check
which ends the daily update run with an error in this case. The log says
   error encountered in cron job with "apt-get check".

Before the switch to systemd timers, when a dpkg run was interrupted (requiring execution of dpkg --configure -a), the unattended upgrade script would recover from this (unless Unattended-Upgrade::AutoFixInterruptedDpkg was set to "false"). So this is a regression.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt 1.2.24
ProcVersionSignature: Ubuntu 4.10.0-35.39~16.04.1-generic 4.10.17
Uname: Linux 4.10.0-35-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Nov 11 15:49:14 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-05-05 (554 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

I can't follow. The apt-get check check has been there since 2007, and the check is the same since 2004.

Revision history for this message
Julian Andres Klode (juliank) wrote :

from precise (12.04):

# check if we can lock the cache and if the cache is clean
if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; then
    debug_echo "error encountered in cron job with \"apt-get check\"."
    exit 0
fi

I also verified that the implementation has not changed one level further. As such I don't see any change here. Maybe something else changed for you.

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

you are right, Julian, I am sorry. The behaviour has not changed at all compared to previous ubuntu releases.

In my case there was the dpkg inconsistency, requiring execution of 'dpkg --configure -a'

But at the same time there was some dependency problem which required calling 'apt -f install'

The latter made 'apt check' error out, but I attributed this to the former.

Changed in apt (Ubuntu):
status: Incomplete → Invalid
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.