Yaniv Bronhaim has uploaded a new change for review. Change subject: Avoiding automatically restart of sanlock service when starting vdsmd ......................................................................
Avoiding automatically restart of sanlock service when starting vdsmd Init scripts are supposed to perform automatic restart to external services. This patch replace the restart with a print to user. For backward compatibility we keep the restart over old usages. Change-Id: I48658066f707632719df8d65799d26c7b239dcd5 Signed-off-by: Yaniv Bronhaim <[email protected]> --- M init/systemd/systemd-vdsmd.in M init/sysvinit/vdsmd.init.in M init/vdsmd_init_common.sh.in 3 files changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/19890/1 diff --git a/init/systemd/systemd-vdsmd.in b/init/systemd/systemd-vdsmd.in index 692e5eb..d07980b 100644 --- a/init/systemd/systemd-vdsmd.in +++ b/init/systemd/systemd-vdsmd.in @@ -28,3 +28,5 @@ "@BINDIR@/vdsm-tool" libvirt-configure ${2:+--force} && "@BINDIR@/vdsm-tool" libvirt-configure-services-restart +"@BINDIR@/vdsm-tool" sanlock-check-service && + "@BINDIR@/vdsm-tool" service-restart sanlock diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in index 2fb4d0d..2160668 100755 --- a/init/sysvinit/vdsmd.init.in +++ b/init/sysvinit/vdsmd.init.in @@ -112,6 +112,11 @@ "$VDSM_TOOL" libvirt-configure-services-restart } +reconfigure_sanlock() { + "$VDSM_TOOL" sanlock-check-service && + "$VDSM_TOOL" service-restart sanlock +} + start() { test_already_running && return 0 @@ -202,6 +207,7 @@ # Jump over 'reconfigure' shift 1 reconfigure_libvirt "$@" + reconfigure_sanlock RETVAL=$? ;; *) diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in index 33094a0..7fc6287 100644 --- a/init/vdsmd_init_common.sh.in +++ b/init/vdsmd_init_common.sh.in @@ -50,20 +50,17 @@ } -task_reconfigure_sanlock() { - _reconfigure_sanlock -} - -_reconfigure_sanlock() { +task_check_sanlock_reconfigure() { # If sanlock was started before the *first* installation of vdsm # then it is probably missing the supplementary groups. # Here we attempt to restart the service (when needed) to refresh # the groups. "$VDSM_TOOL" sanlock-check-service if [ $? != 0 ]; then - echo -n "Attempting to restart sanlock service:" - "$VDSM_TOOL" service-restart sanlock || return 1 + echo "Perform 'vdsm-tool service-restart sanlock' and start vdsm again" + return 1 fi + return 0 } -- To view, visit http://gerrit.ovirt.org/19890 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48658066f707632719df8d65799d26c7b239dcd5 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
