From d7bfd746f89e3f657e6ff742fda3240017a74a41 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 21 2020 21:21:48 +0000 Subject: import hyperv-daemons-0-0.28.20180415git.el8 --- diff --git a/SOURCES/hpvd-Set-IgnoreOnIsolate-1-in-systemd-units.patch b/SOURCES/hpvd-Set-IgnoreOnIsolate-1-in-systemd-units.patch new file mode 100644 index 0000000..908c67e --- /dev/null +++ b/SOURCES/hpvd-Set-IgnoreOnIsolate-1-in-systemd-units.patch @@ -0,0 +1,74 @@ +From 2b218c6e29ff031862c0976deb9810dfb2d79ab2 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Thu, 14 Nov 2019 12:21:46 +0100 +Subject: [PATCH] Set IgnoreOnIsolate=1 in systemd units + +RH-Author: Vitaly Kuznetsov +Message-id: <20191114122146.17009-1-vkuznets@redhat.com> +Patchwork-id: 92251 +O-Subject: [RHEL8.2 hyperv-daemons PATCH] Set IgnoreOnIsolate=1 in systemd units +Bugzilla: 1769920 +RH-Acked-by: Mohammed Gamal +RH-Acked-by: Eduardo Otubo +RH-Acked-by: Laszlo Ersek + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1769920 +Branch: rhel-8.2.0 +Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=24699501 +Upstream: RHEL-only (upstream doesn't ship systemd units) + +Hyper-V daemons' units are udev activated: when the appropriate device +appears systemd unit is started and normal targets (e.g. multi-user.target) +don't depend on these units. With systemd it is possible to try to isolate +the target (somewhat similar to switching runlevel), this is supposed to +shut everything which the target doesn't depend on (like units started +manually) off. It seems that the general users' expectation is that +hyperv-daemons units survive the procedure. + +Signed-off-by: Vitaly Kuznetsov +Signed-off-by: Miroslav Rezanina +--- + hypervfcopyd.service | 1 + + hypervkvpd.service | 1 + + hypervvssd.service | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/hypervfcopyd.service b/hypervfcopyd.service +index fa4a0a3..dd14a97 100644 +--- a/hypervfcopyd.service ++++ b/hypervfcopyd.service +@@ -1,6 +1,7 @@ + [Unit] + Description=Hyper-V FCOPY daemon + BindsTo=sys-devices-virtual-misc-vmbus\x21hv_fcopy.device ++IgnoreOnIsolate=1 + + [Service] + ExecStart=/usr/sbin/hypervfcopyd -n +diff --git a/hypervkvpd.service b/hypervkvpd.service +index d8bfdf3..36ee11c 100644 +--- a/hypervkvpd.service ++++ b/hypervkvpd.service +@@ -2,6 +2,7 @@ + Description=Hyper-V KVP daemon + BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device + After=network.target ++IgnoreOnIsolate=1 + + [Service] + Type=simple +diff --git a/hypervvssd.service b/hypervvssd.service +index 9751cb3..1e5ff43 100644 +--- a/hypervvssd.service ++++ b/hypervvssd.service +@@ -1,6 +1,7 @@ + [Unit] + Description=Hyper-V VSS daemon + BindsTo=sys-devices-virtual-misc-vmbus\x21hv_vss.device ++IgnoreOnIsolate=1 + + [Service] + ExecStart=/usr/sbin/hypervvssd -n +-- +1.8.3.1 + diff --git a/SPECS/hyperv-daemons.spec b/SPECS/hyperv-daemons.spec index 0cd4917..43f9314 100644 --- a/SPECS/hyperv-daemons.spec +++ b/SPECS/hyperv-daemons.spec @@ -13,7 +13,7 @@ Name: hyperv-daemons Version: 0 -Release: 0.27%{?snapver}%{?dist} +Release: 0.28%{?snapver}%{?dist} Summary: Hyper-V daemons suite Group: System Environment/Daemons @@ -50,6 +50,8 @@ Patch0: 0001-tools-hv-update-lsvmbus-to-be-compatible-with-python.patch # Do not set NM_CONTROLED=no Patch1: 0002-hv_set_ifconfig_nm_enable.patch +# For bz#1769920 - [Hyper-V][RHEL8] Running 'systemctl isolate' on any target stops hyperv-daemon services +Patch2: hpvd-Set-IgnoreOnIsolate-1-in-systemd-units.patch # Hyper-V is available only on x86 architectures # The base empty (a.k.a. virtual) package can not be noarch @@ -139,14 +141,24 @@ Contains tools and scripts useful for Hyper-V guests. cp -pvL %{SOURCE0} COPYING cp -pvL %{SOURCE1} hv_kvp_daemon.c +cp -pvL %{SOURCE2} hv_get_dhcp_info.sh +cp -pvL %{SOURCE3} hv_get_dns_info.sh +cp -pvL %{SOURCE4} hv_set_ifconfig.sh +cp -pvL %{SOURCE5} hypervkvpd.service +cp -pvL %{SOURCE6} hypervkvp.rules cp -pvL %{SOURCE100} hv_vss_daemon.c +cp -pvL %{SOURCE101} hypervvssd.service +cp -pvL %{SOURCE102} hypervvss.rules cp -pvL %{SOURCE200} hv_fcopy_daemon.c +cp -pvL %{SOURCE201} hypervfcopyd.service +cp -pvL %{SOURCE202} hypervfcopy.rules cp -pvL %{SOURCE301} lsvmbus %patch0 -p3 -b .lsvmbus_python3 cp -pvL %{SOURCE4} hv_set_ifconfig.sh %patch1 -p0 -b .hv_set_ifconfig_nm_enable +%patch2 -p1 %build # HYPERV KVP DAEMON @@ -170,18 +182,18 @@ install -p -m 0755 %{hv_vss_daemon} %{buildroot}%{_sbindir} install -p -m 0755 %{hv_fcopy_daemon} %{buildroot}%{_sbindir} # Systemd unit file mkdir -p %{buildroot}%{_unitdir} -install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir} -install -p -m 0644 %{SOURCE101} %{buildroot}%{_unitdir} -install -p -m 0644 %{SOURCE201} %{buildroot}%{_unitdir} +install -p -m 0644 hypervkvpd.service %{buildroot}%{_unitdir} +install -p -m 0644 hypervvssd.service %{buildroot}%{_unitdir} +install -p -m 0644 hypervfcopyd.service %{buildroot}%{_unitdir} # Udev rules mkdir -p %{buildroot}%{_udevrulesdir} -install -p -m 0644 %{SOURCE6} %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervkvp.rules -install -p -m 0644 %{SOURCE102} %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervvss.rules -install -p -m 0644 %{SOURCE202} %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervfcopy.rules +install -p -m 0644 hypervkvp.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervkvp.rules +install -p -m 0644 hypervvss.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervvss.rules +install -p -m 0644 hypervfcopy.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervfcopy.rules # Shell scripts for the KVP daemon mkdir -p %{buildroot}%{_libexecdir}/%{hv_kvp_daemon} -install -p -m 0755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dhcp_info -install -p -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dns_info +install -p -m 0755 hv_get_dhcp_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dhcp_info +install -p -m 0755 hv_get_dns_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dns_info install -p -m 0755 hv_set_ifconfig.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_set_ifconfig # Directory for pool files mkdir -p %{buildroot}%{_sharedstatedir}/hyperv @@ -262,6 +274,11 @@ fi %{_sbindir}/lsvmbus %changelog +* Tue Nov 19 2019 Miroslav Rezanina - 0-0.28.20180415git.el8 +- hpvd-Set-IgnoreOnIsolate-1-in-systemd-units.patch [bz#1769920] +- Resolves: bz#1769920 + ([Hyper-V][RHEL8] Running 'systemctl isolate' on any target stops hyperv-daemon services) + * Mon Sep 03 2018 Vitaly Kuznetsov - 0-0.27.20180415git - Do not set NM_CONTROLLED=no (#1624355)