unattended-upgrades can block charm actions and hooks
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-
I hopped onto the unit and found:
2017-03-30 02:09:25 INFO juju-log Installing ['ubuntu-
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@
root 33859 0.0 0.0 1884 1124 ? Ss 02:08 0:00 /bin/sh /usr/lib/
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/
root 35387 0.0 0.0 4100 600 pts/4 S+ 02:09 0:00 dpkg-deb --fsys-tarfile /var/cache/
root 35388 1.0 0.0 4100 128 pts/4 S+ 02:09 0:00 dpkg-deb --fsys-tarfile /var/cache/
root 35389 99.4 0.0 7616 4880 pts/4 R+ 02:09 0:08 dpkg-deb --fsys-tarfile /var/cache/
ubuntu 35439 0.0 0.0 4280 592 pts/3 S+ 02:09 0:00 grep --color=auto apt
tags: | added: charm-upgrade |
Juju 2.0's default behaviour would paper over this problem with automatic hook retries as well :-)