[Pkg-libvirt-maintainers] Bug#702324: Bug#702324: libvirt-bin: Fails to upgrade (systemd in use)

Guido Günther agx at sigxcpu.org
Tue Mar 5 09:15:59 UTC 2013


Hi,
On Tue, Mar 05, 2013 at 11:04:49AM +0200, Antti-Juhani Kaijanaho wrote:
> Package: libvirt-bin
> Version: 0.9.12-8
> Severity: normal
> 
> $ sudo dpkg --configure -a
> Setting up libvirt-bin (0.9.12-8) ...
> The user `libvirt-qemu' is already a member of `libvirt-qemu'.
> [ ok ] Stopping libvirt-bin (via systemctl): libvirt-bin.service.
> Failed to issue method call: No such file or directory
> dpkg: error processing libvirt-bin (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  libvirt-bin
> $ 
> 
> If I add set -x to postinst, I get the following, which suggests that this has
> something to do with systemd.
> 
> $ sudo dpkg --configure -a
> Setting up libvirt-bin (0.9.12-8) ...
> + case "$1" in
> + add_users_groups
> + getent group libvirt
> + getent group kvm
> + getent group libvirt-qemu
> + getent passwd libvirt-qemu
> + adduser libvirt-qemu libvirt-qemu
> The user `libvirt-qemu' is already a member of `libvirt-qemu'.
> + add_statoverrides
> + ROOT_DIRS='        /var/lib/libvirt/images/         /var/lib/libvirt/boot/           /var/cache/libvirt/          '
> + QEMU_DIRS='         /var/lib/libvirt/qemu/            /var/cache/libvirt/qemu/     '
> + SANLOCK_DIR=/var/lib/libvirt/sanlock
> + for dir in '${ROOT_DIRS}'
> + dpkg-statoverride --list /var/lib/libvirt/images/
> + chown root:root /var/lib/libvirt/images/
> + chmod 0711 /var/lib/libvirt/images/
> + for dir in '${ROOT_DIRS}'
> + dpkg-statoverride --list /var/lib/libvirt/boot/
> + chown root:root /var/lib/libvirt/boot/
> + chmod 0711 /var/lib/libvirt/boot/
> + for dir in '${ROOT_DIRS}'
> + dpkg-statoverride --list /var/cache/libvirt/
> + chown root:root /var/cache/libvirt/
> + chmod 0711 /var/cache/libvirt/
> + for dir in '${QEMU_DIRS}'
> + dpkg-statoverride --list /var/lib/libvirt/qemu/
> + chown libvirt-qemu:kvm /var/lib/libvirt/qemu/
> + chmod 0750 /var/lib/libvirt/qemu/
> + for dir in '${QEMU_DIRS}'
> + dpkg-statoverride --list /var/cache/libvirt/qemu/
> + chown libvirt-qemu:kvm /var/cache/libvirt/qemu/
> + chmod 0750 /var/cache/libvirt/qemu/
> + dpkg-statoverride --list /var/lib/libvirt/sanlock
> + chown root:root /var/lib/libvirt/sanlock
> + chmod 0700 /var/lib/libvirt/sanlock
> + '[' -n 0.9.12-7 ']'
> + dpkg --compare-versions 0.9.12-7 ge 0.6.0
> ++ which invoke-rc.d
> + '[' -x /usr/sbin/invoke-rc.d ']'
> + invoke-rc.d libvirt-bin stop
> [ ok ] Stopping libvirt-bin (via systemctl): libvirt-bin.service.
> + sleep 1
> + '[' -x /bin/systemctl ']'
> + '[' -d /sys/fs/cgroup/systemd ']'
> + systemctl enable libvirt-bin.service
> Failed to issue method call: No such file or directory
> dpkg: error processing libvirt-bin (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:


Could you check if this works (what got added to the postinst):

if [ -x /bin/systemctl ] && [ -d /sys/fs/cgroup/systemd ]; then
    systemctl enable libvirt-bin.service
    systemctl enable libvirt-guests.service
fi

If not the check we're doing to detect systemd availabliligy might be
unreliable. I'm cc'ing Tollef, maybe he has an idea. Tollef, we're
doing the above in the libvirt-bin.postinst to activate it's services.
Does this look correct?

Cheers,
 -- Guido



More information about the Pkg-libvirt-maintainers mailing list