/etc/default/virtlockd not installed

Bug #1729516 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Debian)
Fix Released
Unknown
libvirt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

virtlockd has no defaults file installed /etc/default/virtlockd

This was partially fixed in my contrib to Debian, but our removal of the related sysv script rendered it non-working again (Debian didn't have that for some time so they are broken as well).

Note:
I also evaluated that it is correct that the service isn't started after install - that is ok (socket activated, details see below).

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Might be just socket activated, but I've also seen that (the super rarely a.k.a. almost never used) file /etc/default/virtlockd is missing.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I took a little overview, these services are usually only needed for special cases (locks for e.g. net disks), and almost never configured - so this was undetected for quite a while.

Xenial: started, /etc/default/virtlockd installed
Zesty: started, /etc/default/virtlockd not installed
Artful: not started, /etc/default/virtlockd not installed
Debian (Buster): not started, /etc/default/virtlockd not installed

I brought a fix into Debian a while ago:
 3.5.0-1:
 * [dd2991f] Ship default file for virtlockd
 * [c3b6ff2] Ship default file for virtlockd (Closes: #863648)

It was not considered SRU worthy (given how few edit the file and could just create it), but but in addition it seems lost or inactive in Artful.

For the service not being started that begins in Artful.
So this came in via Debian and we picked it up not realizing the issue so far.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

There was a line missing for virtlockd to be properly picked up by latter dh_* calls.
Adding that in a ppa fixed the issue of the missing default conf file.

But the service still didn't start by default.
virtlogd still serves its sysv script and thereby has an extra enable call
  invoke-rc.d virtlogd start
which might be mapped to the service which then is enabled.
Debian never had that for virtlockd, and Ubuntu followed by dropping as well in 3.5.0-1ubuntu1.
While silly this could be the reason it isn't started correctly.

Yes as I assumed virtlogd is started via the sysv (more or less unintentionally, so it works by accident).
But the systemd portion for virtlockd considers it disabled/static
  + systemctl --system daemon-reload
  + deb-systemd-invoke start virtlockd.service virtlockd.socket
  virtlockd.service is a disabled or a static unit, not starting it.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Modifying the pre/post-inst files I found that really virtlogd is just active by this sysv accident that is left.

For virtlockd as outlined it fails to enable at:
 $ deb-systemd-invoke start virtlockd.service
 virtlockd.service is a disabled or a static unit, not starting it.
virtlogd behaves the same way in regard to this command.

Well actually this should be correct I think.
The socket is enabled:
# systemctl status virtlockd.socket
● virtlockd.socket - Virtual machine lock manager socket
   Loaded: loaded (/lib/systemd/system/virtlockd.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Mon 2017-11-06 14:22:48 UTC; 13min ago
   Listen: /var/run/libvirt/virtlockd-sock (Stream)

And the service is inactive (by being indirect) as it is an Also=virtlockd.socket
# systemctl status virtlockd.service
● virtlockd.service - Virtual machine lock manager
   Loaded: loaded (/lib/systemd/system/virtlockd.service; indirect; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:virtlockd(8)
           http://libvirt.org

I was able to activate it through that socket and this matches https://libvirt.org/locking-lockd.html#sanlock

All that said, I'll suggest that change to provide the defaults file correctly to Debian now.

description: updated
summary: - virtlockd not starting
+ /etc/default/virtlockd not installed
Changed in libvirt (Debian):
status: Unknown → New
tags: added: patch-forwarded-debian
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

While not super important I'll pick it for 18.04 as Debian unfortunately (because not too important I guess) hasn't picked it yet.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (13.5 KiB)

This bug was fixed in the package libvirt - 4.0.0-1ubuntu1

---------------
libvirt (4.0.0-1ubuntu1) bionic; urgency=medium

  * Merged with Debian unstable (4.0)
    This closes several bugs:
    - Error generating apparmor profile when hostname contains spaces
      (LP: #799997)
    - qemu 2.10 locks files, libvirt shared now sets share-rw=on (LP: #1716028)
    - libvirt usb passthrough throws apparmor denials related to
      /run/udev/data/+usb (LP: #1727311)
    - AppArmor denies access to /sys/block/*/queue/max_segments (LP: #1729626)
    - iohelper improvements to let bypass-cache work without opening up the
      apparmor isolation (LP: #1719579)
    - nodeinfo on s390x to contain more CPU info (LP: #1733688)
    - Upgrade libvirt >= 4.0 (LP: #1745934)
  * Remaining changes:
    - Disable libssh2 support (universe dependency)
    - Disable firewalld support (universe dependency)
    - Disable selinux
    - Set qemu-group to kvm (for compat with older ubuntu)
    - Additional apport package-hook
    - Modifications to adapt for our delayed switch away from libvirt-bin (can
      be dropped >18.04).
      + d/p/ubuntu/libvirtd-service-add-bin-alias.patch: systemd: define alias
        to old service name so that old references work
      + d/p/ubuntu/libvirtd-init-add-bin-alias.patch: sysv init: define alias
        to old service name so that old references work
      + d/control: transitional package with the old name and maintainer
        scripts to handle the transition
    - Backwards compatible handling of group rename (can be dropped >18.04).
    - config details and autostart of default bridged network. Creating that is
      now the default in general, yet our solution provides the following on
      top as of today:
      + autostart the default network by default
      + do not autostart if subnet is already taken (e.g. in guests).
    - d/p/ubuntu/Allow-libvirt-group-to-access-the-socket.patch: This is
      the group based access to libvirt functions as it was used in Ubuntu
      for quite long.
      + d/p/ubuntu/daemon-augeas-fix-expected.patch fix some related tests
        due to the group access change.
    - ubuntu/parallel-shutdown.patch: set parallel shutdown by default.
    - d/p/ubuntu/enable-kvm-spice.patch: compat with older Ubuntu qemu/kvm
      which provided a separate kvm-spice.
    - d/p/ubuntu/ubuntu-libxl-qemu-path.patch: this change was split. The
      section that adapts the path of the emulator to the Debian/Ubuntu
      packaging is kept.
    - d/p/ubuntu/ubuntu-libxl-Fix-up-VRAM-to-minimum-requirements.patch: auto
      set VRAM to minimum requirements
    - d/p/ubuntu/xen-default-uri.patch: set default URI on xen hosts
    - Add libxl log directory
    - libvirt-uri.sh: Automatically switch default libvirt URI for users on
      Xen dom0 via user profile (was missing on changelogs before)
    - d/p/ubuntu/apibuild-skip-libvirt-common.h: drop libvirt-common.h from
      included_files to avoid build failures due to duplicate definitions.
    - Update README.Debian with Ubuntu changes
    - Convert libvirt0, libnss_libvirt and libvirt-dev to multi-arch.
    - Enable some additional features on ppc...

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