Commit 199965b3 authored by Marcelo Henrique Cerri's avatar Marcelo Henrique Cerri Committed by Kelsey Skunberg

UBUNTU: [Packaging] Bind hv_vss_daemon startup to hv_vss device

BugLink: https://bugs.launchpad.net/bugs/1891224

Update the systemd service for the vss daemon and add a new udev rule
to ensure the service will not fail in case vss is not enabled for the
guest.

The udev rules is responsible for starting the service only when the
vss device is available. In the unit file, the service is now bound to
the device unit, so the service can be stopped if the device is
removed. And the service is also conditioned to the existence of the
device, this way we avoid starting and stopping the service during
boot if the device is not available.
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 412c4bfc
......@@ -4,6 +4,8 @@
[Unit]
Description=Hyper-V VSS Protocol Daemon
ConditionVirtualization=microsoft
ConditionPathExists=/dev/vmbus/hv_vss
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_vss.device
[Service]
ExecStart=/usr/sbin/hv_vss_daemon -n
......
SUBSYSTEM=="misc", KERNEL=="vmbus/hv_vss", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv-vss-daemon.service"
......@@ -200,6 +200,7 @@ ifeq ($(do_tools_hyperv),true)
dh_installinit -p$(cloudpkg) -n --name hv-vss-daemon
dh_installinit -p$(cloudpkg) -n --name hv-fcopy-daemon
dh_installudev -p$(cloudpkg) -n --name hv-kvp-daemon
dh_installudev -p$(cloudpkg) -n --name hv-vss-daemon
dh_systemd_enable -p$(cloudpkg)
dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon
dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment