Upgrading libvirt from trusty to cloud/stable/liberty fails

Bug #1499199 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Unassigned

Bug Description

When upgrading libvirt-bin after adding the stable/liberty cloud-ppa, I'm getting this error:

ubuntu@jr2:~$ sudo apt-get install libvirt-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjs-sphinxdoc libjs-underscore libxen-dev python-py python-virtualenv
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libvirt0
Suggested packages:
  radvd lvm2
The following packages will be upgraded:
  libvirt-bin libvirt0
2 upgraded, 0 newly installed, 0 to remove and 55 not upgraded.
Need to get 0 B/3307 kB of archives.
After this operation, 2332 kB of additional disk space will be used.
Do you want to continue? [Y/n]
WARNING: The following packages cannot be authenticated!
  libvirt-bin libvirt0
Install these packages without verification? [y/N] y
(Reading database ... 90242 files and directories currently installed.)
Preparing to unpack .../libvirt-bin_1.2.16-2ubuntu10~cloud0_amd64.deb ...
libvirt-bin stop/waiting
stop: Unknown instance:
dpkg: error processing archive /var/cache/apt/archives/libvirt-bin_1.2.16-2ubuntu10~cloud0_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
libvirt-bin start/running, process 22382
Preparing to unpack .../libvirt0_1.2.16-2ubuntu10~cloud0_amd64.deb ...
Unpacking libvirt0 (1.2.16-2ubuntu10~cloud0) over (1.2.2-0ubuntu13.1.14) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libvirt-bin_1.2.16-2ubuntu10~cloud0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ubuntu@jr2:~$ apt-cache policy libvirt-bin
libvirt-bin:
  Installed: 1.2.2-0ubuntu13.1.14
  Candidate: 1.2.16-2ubuntu10~cloud0
  Version table:
     1.2.16-2ubuntu10~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
 *** 1.2.2-0ubuntu13.1.14 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.2.2-0ubuntu13.1.7 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.2.2-0ubuntu13 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

This only happen if the package from trusty-updates is installed before adding the cloud PPA. If libvirt-bin is not installed, the installation of the new package works fine.

Expected result: The upgrade of libvirt-bin should work without an error.

Steps to reproduce:
$ apt-get install libvirt-bin
$ echo "http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main" > /etc/apt/sources.list.d/os.list
$ apt-get update
$ apt-get install libvirt-bin

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. I can reproduce it with the cloud archive. This actually may become a problem when people upgrade from 14.04->16.04.

Changed in libvirt (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The problem is that with upstart, 'service libvirt-bin status' returns true even if libvirt-bin is stopped. In systemd, it returns false. So the check in libvirt-bin.pre-inst will need to change.

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

This bug was fixed in the package libvirt - 1.2.16-2ubuntu11

---------------
libvirt (1.2.16-2ubuntu11) wily; urgency=medium

  * Fix the preinst and postinst: the check for whether libvirt-bin was
    running was wrong for upstart systems, but we don't need to do that
    anyway - just stop libvirt-bin unconditionally. (LP: #1499199)
  * libvirt-guests.service: fix libvirtd.service -> libvirt-bin.service

 -- Serge Hallyn <email address hidden> Sun, 27 Sep 2015 15:47:08 +0000

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
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.