Yaniv Bronhaim has uploaded a new change for review. Change subject: Adding reconfigure libvirt to vdsm upgrade flow ......................................................................
Adding reconfigure libvirt to vdsm upgrade flow After upgrade vdsm and supervdsm should restart if ran (due to code upgrade). libvirt configure should run if needed, and if reconfigure occurred we should restart libvirt service as well if it was up. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1019200 Change-Id: I89c5c0b657e5647abe2df5008bf24819a9c13f7b Signed-off-by: Yaniv Bronhaim <[email protected]> --- M vdsm.spec.in 1 file changed, 21 insertions(+), 15 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/20397/1 diff --git a/vdsm.spec.in b/vdsm.spec.in index e175ff8..e99e586 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -726,24 +726,30 @@ %endif %postun -%if 0%{?rhel} if [ "$1" -ge 1 ]; then - /sbin/service vdsmd condrestart > /dev/null 2>&1 - /sbin/service supervdsmd condrestart > /dev/null 2>&1 + supervdsmd_start_required='no' + vdsmd_start_required='no' + if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 + vdsmd_start_required='yes' + fi + if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 + supervdsmd_start_required='yes' + fi + if %{_bindir}/vdsm-tool libvirt-configure | grep -q 'is done.'; then + if %{_bindir}/vdsm-tool service-status libvirtd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-restart libvirtd >/dev/null 2>&1 + fi + fi + if [ "${supervdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 + fi + if [ "${vdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 + fi fi exit 0 -%else -%if 0%{?with_systemd_macros} -%systemd_postun_with_restart vdsmd.service -%systemd_postun_with_restart supervdsmd.service -%else -if [ "$1" -ge 1 ] ; then - /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : - /bin/systemctl try-restart supervdsmd.service >/dev/null 2>&1 || : -fi -exit 0 -%endif -%endif %if 0%{?rhel} %triggerun -- libvirt -- To view, visit http://gerrit.ovirt.org/20397 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89c5c0b657e5647abe2df5008bf24819a9c13f7b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Yaniv Bronhaim <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
