unattended-upgrades can block charm actions and hooks

Bug #1677431 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Triaged
Low
Unassigned
OpenStack Nova Compute Charm
Triaged
Low
Unassigned

Bug Description

I was just trying to perform upgrades on a unit and found that dpkg was locked by unattended-upgrades. This could be problematic to maintenance actions and hook execution.

I hopped onto the unit and found:

2017-03-30 02:09:25 INFO juju-log Installing ['ubuntu-cloud-keyring'] with options: ['--option=Dpkg::Options::=--force-confold']
2017-03-30 02:09:25 INFO install E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017-03-30 02:09:25 INFO install E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017-03-30 02:09:25 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.
2017-03-30 02:09:35 INFO install E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017-03-30 02:09:35 INFO install E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017-03-30 02:09:35 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.
2017-03-30 02:09:45 INFO install E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017-03-30 02:09:45 INFO install E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017-03-30 02:09:45 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.

ubuntu@node-moingo:/var/log/juju$ ps aux | grep apt
root 33859 0.0 0.0 1884 1124 ? Ss 02:08 0:00 /bin/sh /usr/lib/apt/apt.systemd.daily
root 35377 22.3 0.0 24180 21652 pts/4 Ss+ 02:09 0:02 /usr/bin/dpkg --status-fd 10 --unpack --auto-deconfigure /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_arm64.deb /var/cache/apt/archives/linux-generic_4.4.0.71.77_arm64.deb /var/cache/apt/archives/linux-image-generic_4.4.0.71.77_arm64.deb /var/cache/apt/archives/linux-headers-4.4.0-71_4.4.0-71.92_all.deb /var/cache/apt/archives/linux-headers-4.4.0-71-generic_4.4.0-71.92_arm64.deb /var/cache/apt/archives/linux-headers-generic_4.4.0.71.77_arm64.deb /var/cache/apt/archives/linux-libc-dev_4.4.0-71.92_arm64.deb
root 35387 0.0 0.0 4100 600 pts/4 S+ 02:09 0:00 dpkg-deb --fsys-tarfile /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_arm64.deb
root 35388 1.0 0.0 4100 128 pts/4 S+ 02:09 0:00 dpkg-deb --fsys-tarfile /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_arm64.deb
root 35389 99.4 0.0 7616 4880 pts/4 R+ 02:09 0:08 dpkg-deb --fsys-tarfile /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_arm64.deb
ubuntu 35439 0.0 0.0 4280 592 pts/3 S+ 02:09 0:00 grep --color=auto apt

Revision history for this message
James Page (james-page) wrote :

Juju 2.0's default behaviour would paper over this problem with automatic hook retries as well :-)

Changed in charm-nova-compute:
status: New → Triaged
importance: Undecided → Low
Changed in charm-helpers:
status: New → Triaged
importance: Undecided → Low
tags: added: charm-upgrade
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.