Skip to content

Commit

Permalink
UBUNTU: [Packaging] bind hv_kvp_daemon startup to hv_kvp device
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1820063

The hv_kvp_daemon service requires the hv_kvp device and should
be started when the device appears and stopped in it disappears.
Solution is based off the one provided at
https://bugzilla.redhat.com/show_bug.cgi?id=1195029#c22.

Acked-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Colin Ian King <[email protected]>
Signed-off-by: Seth Forshee <[email protected]>
  • Loading branch information
Seth Forshee committed Apr 10, 2019
1 parent c73d7d9 commit 8e2ea6b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/linux-cloud-tools-common.hv-kvp-daemon.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Description=Hyper-V KVP Protocol Daemon
ConditionVirtualization=microsoft
DefaultDependencies=no
After=systemd-remount-fs.service
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device
After=sys-devices-virtual-misc-vmbus\x21hv_kvp.device systemd-remount-fs.service
Before=shutdown.target cloud-init-local.service walinuxagent.service
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/hyperv
Expand Down
1 change: 1 addition & 0 deletions debian/linux-cloud-tools-common.hv-kvp-daemon.udev
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="misc", KERNEL=="vmbus/hv_kvp", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv-kvp-daemon.service"
1 change: 1 addition & 0 deletions debian/rules.d/3-binary-indep.mk
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ ifeq ($(do_tools_hyperv),true)
dh_installinit -p$(cloudpkg) -n --name hv-kvp-daemon
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_systemd_enable -p$(cloudpkg)
dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon
dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon
Expand Down

0 comments on commit 8e2ea6b

Please sign in to comment.