postinst fails if missing user is in the admin group

Bug #565380 reported by Rainer Rohde
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Low
Dustin Kirkland 
Lucid
Fix Released
Low
Dustin Kirkland 

Bug Description

Happened during upgrading Lucid today (Apr 17).

libvirt-bin:
  Installed: 0.7.5-5ubuntu25
  Candidate: 0.7.5-5ubuntu25
  Version table:
 *** 0.7.5-5ubuntu25 0
        500 http://gb.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: libvirt-bin 0.7.5-5ubuntu25
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: wl nvidia
Architecture: amd64
Date: Sat Apr 17 14:53:35 2010
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
SourcePackage: libvirt
Title: package libvirt-bin 0.7.5-5ubuntu25 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Related branches

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is the error in question:
Setting up libvirt-bin (0.7.5-5ubuntu25) ...
Installing new version of config file /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper ...
adduser: The user `tester' does not exist.
dpkg: error processing libvirt-bin (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-libvirt (0.7.5-5ubuntu25) ...

This must be caused by the following snippet in libvirt-bin.postinst:
        # Add each admin user to the libvirtd group
        for u in $(grep "^admin:" /etc/group | sed -e "s/^.*://" -e "s/,/ /g"); do
                adduser "$u" libvirtd >/dev/null
        done

It seems you have a 'tester' user that you removed from the system, but forgot to remove from the 'admin' group. Please adjust your /etc/group file accordingly. Then you can run 'sudo apt-get -f install ; sudo apt-get upgrade' to cleanup.

The postinst should probably be adjusted to have:
  adduser "$u" libvirtd >/dev/null || true

Changed in libvirt (Ubuntu):
status: New → Triaged
importance: Undecided → Low
summary: - package libvirt-bin 0.7.5-5ubuntu25 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 1
+ postinst fails if missing user is in the admin group
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Thank you Jamie - that did it! :)

Changed in libvirt (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Easy to fix, will bundle with upload for Bug #562266. Proposing for Lucid as low-hanging, low-risk.

Changed in libvirt (Ubuntu):
status: Triaged → In Progress
Changed in libvirt (Ubuntu Lucid):
milestone: none → ubuntu-10.04
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fix committed, in the UNAPPROVED queue for lucid, awaiting ubuntu-release approval post RC.

Changed in libvirt (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
wfaulk (wfaulk) wrote :

From Merged bug #567927, the "missing" user still existed in the system, but was not in /etc/passwd because it was in NIS. This may be a different enough edge case that it may need a different solution.

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

This bug was fixed in the package libvirt - 0.7.5-5ubuntu27

---------------
libvirt (0.7.5-5ubuntu27) lucid; urgency=low

  * debian/libvirt-bin.postinst: ensure that the convenience feature
    of adding users to the libvirtd group does cause package setup
    failure, LP: #565380
  * debian/patches/9023-virt-pki-validate_fixes.patch: fix a bashism,
    a missing autoconf substitution, and an insufficient sed call, in
    order to get this working on Ubuntu, LP: #562266; patch submitted
    upstream
 -- Dustin Kirkland <email address hidden> Wed, 21 Apr 2010 15:59:49 -0500

Changed in libvirt (Ubuntu Lucid):
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.