apt-get upgrade for nova-compute gives error

Asked by Graham Hemingway

I just tried to install the latest update from trunk on a machine with just nova-compute and libvirt-bin. The whole install seems to go well, but at the end I get the following message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  nova-common nova-compute python-nova
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 535kB of archives.
After this operation, 8,192B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ppa.launchpad.net/nova-core/trunk/ubuntu/ maverick/main nova-compute all 2011.3~bzr1058-0ubuntu0ppa1~maverick1 [8,800B]
Get:2 http://ppa.launchpad.net/nova-core/trunk/ubuntu/ maverick/main nova-common all 2011.3~bzr1058-0ubuntu0ppa1~maverick1 [22.8kB]
Get:3 http://ppa.launchpad.net/nova-core/trunk/ubuntu/ maverick/main python-nova all 2011.3~bzr1058-0ubuntu0ppa1~maverick1 [503kB]
Fetched 535kB in 2s (207kB/s)
(Reading database ... 51819 files and directories currently installed.)
Preparing to replace nova-compute 2011.3~bzr1054-0ubuntu0ppa1~maverick1 (using .../nova-compute_2011.3~bzr1058-0ubuntu0ppa1~maverick1_all.deb) ...
nova-compute stop/waiting
Unpacking replacement nova-compute ...
Preparing to replace nova-common 2011.3~bzr1054-0ubuntu0ppa1~maverick1 (using .../nova-common_2011.3~bzr1058-0ubuntu0ppa1~maverick1_all.deb) ...
Unpacking replacement nova-common ...
Preparing to replace python-nova 2011.3~bzr1054-0ubuntu0ppa1~maverick1 (using .../python-nova_2011.3~bzr1058-0ubuntu0ppa1~maverick1_all.deb) ...
Unpacking replacement python-nova ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for python-support ...
Setting up python-nova (2011.3~bzr1058-0ubuntu0ppa1~maverick1) ...
Setting up nova-common (2011.3~bzr1058-0ubuntu0ppa1~maverick1) ...
Installing new version of config file /etc/sudoers.d/nova_sudoers ...
Setting up nova-compute (2011.3~bzr1058-0ubuntu0ppa1~maverick1) ...
/var/lib/dpkg/info/nova-compute.postinst: 13: dpkg-vendor: not found
adduser: The group `libvirt' does not exist.
dpkg: error processing nova-compute (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for python-support ...
Errors were encountered while processing:
 nova-compute
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is this a problem? What is causing it and how do I avoid this in the future?
Thanks,
   Graham

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Graham Hemingway
Solved:
Last query:
Last reply:
Revision history for this message
Dan Prince (dan-prince) said :
#1

Hi Graham,

This could be an issue in the postinst script for nova-compute.

The nova-compute.postinst script contains the following:

---
    if dpkg-vendor --derives-from ubuntu ; then
        LIBVIRTGRP=libvirtd
    else
        LIBVIRTGRP=libvirt
    fi
    if ! getent group ${LIBVIRTGRP} | grep -qE '\<nova\>'
    then
        adduser nova ${LIBVIRTGRP}
    fi
---

Are you running nova-compute on Ubuntu Maverick? Do you have either of the libvirt or libvirtd groups created on your os? Perhaps instead of checking dpkg-vendor we should look for either libvirtd or libvirt and add nova to the first group it finds?

Hope this helps.

Dan

Revision history for this message
Graham Hemingway (graham-hemingway) said :
#2

Dan,

I am indeed running nova-compute on Maverick. libvirtd is a group as is kvm. nova is a member of libvirtd.

As a possible cause, I tried running dpkg-vendor and it is not currently installed.

Is dpkg-dev a recognized dependency?

Cheers,
   Graham

Revision history for this message
Dan Prince (dan-prince) said :
#3

Graham,

Yes. Correct.

I would say this is an issue (bug) with the packages and that we should not require dpkg-vendor.

Instead of dpkg-vendor we should probably update the post install script to check for both groups. Whichever group group it finds first (libvirtd or libvirt) it can then test to see if nova is already a member of the group and if not then add nova to the group.

Revision history for this message
Graham Hemingway (graham-hemingway) said :
#4

Dan,

Thanks. I opened https://bugs.launchpad.net/nova/+bug/781716 to track this issue.
Cheers,
   Graham