Martin Sivák has uploaded a new change for review. Change subject: Add a libvirt migration hook to filter out min_guarantee element ......................................................................
Add a libvirt migration hook to filter out min_guarantee element Change-Id: I5f5e79037b755b257f9cac419887606f66705504 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138340 Signed-off-by: Martin Sivak <msi...@redhat.com> --- M vdsm.spec.in M vdsm/virt/Makefile.am A vdsm/virt/libvirt-hook.sh 3 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/32928/1 diff --git a/vdsm.spec.in b/vdsm.spec.in index 4c7f7a1..87aef13 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -700,6 +700,10 @@ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla %endif +# Install the libvirt hook for cleaning up the XML +install -Dm 0755 vdsm/virt/libvirt-hook.sh \ + %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu + %check %if 0%{?with_check} make check @@ -985,6 +989,7 @@ %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/cron.d/vdsm-libvirt-logrotate +%{_sysconfdir}/libvirt/hooks/qemu %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* %{_libexecdir}/%{vdsm_name}/curl-img-wrap diff --git a/vdsm/virt/Makefile.am b/vdsm/virt/Makefile.am index bca9a5a..8ae104a 100644 --- a/vdsm/virt/Makefile.am +++ b/vdsm/virt/Makefile.am @@ -36,3 +36,7 @@ vmxml.py \ utils.py \ $(NULL) + +EXTRA_DIST = \ + libvirt-hook.sh \ + $(NULL) diff --git a/vdsm/virt/libvirt-hook.sh b/vdsm/virt/libvirt-hook.sh new file mode 100644 index 0000000..129422d --- /dev/null +++ b/vdsm/virt/libvirt-hook.sh @@ -0,0 +1,13 @@ +#!/bin/sh +DOMAIN=$1 +EVENT=$2 +PHASE=$3 + +if [ ! "x$EVENT" == "xmigrate" ]; then + exit 0 +fi + +# Fix VMs migrating to host with libvirt >= 1.2.8 +# See https://bugzilla.redhat.com/show_bug.cgi?id=1138340 +exec sed -e 's|<min_guarantee>[0-9 ]*</min_guarantee>||g' + -- To view, visit http://gerrit.ovirt.org/32928 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f5e79037b755b257f9cac419887606f66705504 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Sivák <msi...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches