Packages may get installed multiple times in case one fails to install

Bug #1444826 reported by Björn Tillenius
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Critical
Björn Tillenius
landscape-client (Ubuntu)
New
Undecided
Unassigned
Trusty
New
Undecided
Unassigned

Bug Description

If a package activity wants to install 2 packages, where the second package fails to install due to some error, the first one will be installed multiple times.

This is because there's code that aims at retrying when the dpkg lock can't be obtained, but in reality the code catches any error, even SystemError which is most likely a permanent error that won't be resolved by retrying.

Here is an extract of dpkg.log from a machine where this happened:

$ grep ' install' dpkg.log | grep nova-compute
2015-04-14 14:24:24 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:24:36 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:24:36 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:25:43 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:25:43 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:25:43 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:26:49 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:26:49 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:26:49 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:27:56 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:27:56 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:27:56 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:29:03 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:29:04 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:29:04 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:30:05 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:30:05 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:30:05 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:31:17 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:31:17 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:31:17 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:32:23 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:32:23 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:32:23 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:33:30 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:33:30 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:33:30 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:34:39 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:34:39 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:34:39 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:35:47 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:35:47 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:35:47 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:36:58 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:36:58 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:36:58 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2
2015-04-14 14:38:06 status installed nova-compute-kvm:all 1:2014.1.4-0ubuntu2
2015-04-14 14:38:06 status installed nova-compute:all 1:2014.1.4-0ubuntu2
2015-04-14 14:38:06 status installed nova-compute-libvirt:all 1:2014.1.4-0ubuntu2

And here is an extract from package-changer.log:

package-changer.log:2015-04-14 14:24:41,343 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 11 retries remaining.
package-changer.log:2015-04-14 14:25:48,459 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 10 retries remaining.
package-changer.log:2015-04-14 14:26:54,985 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 9 retries remaining.
package-changer.log:2015-04-14 14:28:01,634 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 8 retries remaining.
package-changer.log:2015-04-14 14:29:09,249 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 7 retries remaining.
package-changer.log:2015-04-14 14:30:10,999 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 6 retries remaining.
package-changer.log:2015-04-14 14:31:22,767 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 5 retries remaining.
package-changer.log:2015-04-14 14:32:29,152 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 4 retries remaining.
package-changer.log:2015-04-14 14:33:36,186 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 3 retries remaining.
package-changer.log:2015-04-14 14:34:44,518 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 2 retries remaining.
package-changer.log:2015-04-14 14:35:52,711 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 1 retries remaining.
package-changer.log:2015-04-14 14:37:03,726 WARNING [MainThread] dpkg
process might be in use. Retrying package changes. 0 retries remaining.

Related branches

Changed in landscape-client:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Björn Tillenius (bjornt)
David Britton (dpb)
Changed in landscape-client:
milestone: none → 15.06
Changed in landscape-client:
status: Fix Committed → Fix Released
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.