Public bug reported:

The udev postinst failed like this on an upgrade in cosmic from 237-3ubuntu10.3 
to 239-7ubuntu7:
Setting up udev (239-7ubuntu7) ...
Installing new version of config file /etc/udev/udev.conf ...
The group `kvm' already exists and is not a system group. Exiting.
dpkg: error processing package udev (--configure):
 installed udev package post-installation script subprocess returned error exit 
status 1


The postinst script seemd to blindly add the kvm group. It is relying on the 
fact that the groups it's trying to add are already system groups, in which 
case addgroup --system doesn't fail
case "$1" in
    configure)
    # update/create hwdb before we (re)start udev
    update_hwdb

    # Add new system group used by udev rules
    addgroup --quiet --system input

    # Make /dev/kvm accessible to kvm group
    addgroup --quiet --system kvm

But on this machine "kvm" has a high gid, so it's not deemed to be a
system group, in which case addgroup fails.

root@diamond:~# getent group input kvm
input:x:106:
kvm:x:1001:<big list of members sanitized>
root@diamond:~# addgroup --quiet --system input;echo $?
0
root@diamond:~# addgroup --quiet --system kvm;echo $?
The group `kvm' already exists and is not a system group. Exiting.
1


Someone, or some package, probably did an addgroup without --system some time 
ago. A quick grep in /var/lib/dpkg/info shows at least 3 packages trying to add 
a group called kvm:
root@diamond:~# grep -E "addgroup.*kvm" /var/lib/dpkg/info/*
/var/lib/dpkg/info/libvirt-daemon-system.postinst:        addgroup --quiet 
--system kvm
/var/lib/dpkg/info/qemu-system-common.postinst:        addgroup --quiet 
--system kvm || true
/var/lib/dpkg/info/qemu-system-common.preinst:        addgroup --quiet --system 
kvm || true
/var/lib/dpkg/info/udev.postinst:    addgroup --quiet --system kvm || /bin/true

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1791102

Title:
  udev postinst fails because kvm group already exists and is not a
  system group

Status in systemd package in Ubuntu:
  New

Bug description:
  The udev postinst failed like this on an upgrade in cosmic from 
237-3ubuntu10.3 to 239-7ubuntu7:
  Setting up udev (239-7ubuntu7) ...
  Installing new version of config file /etc/udev/udev.conf ...
  The group `kvm' already exists and is not a system group. Exiting.
  dpkg: error processing package udev (--configure):
   installed udev package post-installation script subprocess returned error 
exit status 1

  
  The postinst script seemd to blindly add the kvm group. It is relying on the 
fact that the groups it's trying to add are already system groups, in which 
case addgroup --system doesn't fail
  case "$1" in
      configure)
      # update/create hwdb before we (re)start udev
      update_hwdb

      # Add new system group used by udev rules
      addgroup --quiet --system input

      # Make /dev/kvm accessible to kvm group
      addgroup --quiet --system kvm

  But on this machine "kvm" has a high gid, so it's not deemed to be a
  system group, in which case addgroup fails.

  root@diamond:~# getent group input kvm
  input:x:106:
  kvm:x:1001:<big list of members sanitized>
  root@diamond:~# addgroup --quiet --system input;echo $?
  0
  root@diamond:~# addgroup --quiet --system kvm;echo $?
  The group `kvm' already exists and is not a system group. Exiting.
  1

  
  Someone, or some package, probably did an addgroup without --system some time 
ago. A quick grep in /var/lib/dpkg/info shows at least 3 packages trying to add 
a group called kvm:
  root@diamond:~# grep -E "addgroup.*kvm" /var/lib/dpkg/info/*
  /var/lib/dpkg/info/libvirt-daemon-system.postinst:        addgroup --quiet 
--system kvm
  /var/lib/dpkg/info/qemu-system-common.postinst:        addgroup --quiet 
--system kvm || true
  /var/lib/dpkg/info/qemu-system-common.preinst:        addgroup --quiet 
--system kvm || true
  /var/lib/dpkg/info/udev.postinst:    addgroup --quiet --system kvm || 
/bin/true

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1791102/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to