Fernando Granha Jeronimo has uploaded a new change for review.

Change subject: Enable vdsm-reg service
......................................................................

Enable vdsm-reg service

Due to some typos in the vdsm-reg service name (vdsmd-reg instead of vdsm-reg),
the service is not enbaled after rpm installation.

Change-Id: Id96224cd61e6cd1e88ca94649b71f2f5f88886c1
Signed-off-by: Fernando Granha Jeronimo <[email protected]>
---
M vdsm.spec.in
M vdsm_reg/vdsm-config
2 files changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/8037/1

diff --git a/vdsm.spec.in b/vdsm.spec.in
index ca678da..bf2e3a4 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -536,7 +536,7 @@
 fi
 %else
 if [ "$1" -eq 1 ] ; then
-    /bin/systemctl enable vdsmd-reg.service >/dev/null 2>&1 || :
+    /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || :
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
 exit 0
@@ -551,8 +551,8 @@
 fi
 %else
 if [ "$1" -eq 0 ]; then
-    /bin/systemctl --no-reload disable vdsmd-reg.service > /dev/null 2>&1 || :
-    /bin/systemctl stop vdsmd-reg.service > /dev/null 2>&1 || :
+    /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || :
+    /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || :
 fi
 exit 0
 %endif
diff --git a/vdsm_reg/vdsm-config b/vdsm_reg/vdsm-config
index 6e0f7f3..3dfb072 100755
--- a/vdsm_reg/vdsm-config
+++ b/vdsm_reg/vdsm-config
@@ -14,6 +14,16 @@
 
        echo "vdsm-config: starting" | tee $LOG
 
+       # Disable vdsm-reg service to avoid race condition
+       # when parameters are written to config file and the
+       # service is running. This is necessary, because the
+       # registration process can take place only after reboot.
+       if [ -x /bin/systemctl ] ; then
+           /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1
+       elif [ -x /sbin/service ] ; then
+           /sbin/service vdsm-reg stop > /dev/null 2>&1
+       fi
+
 set_vars() {
        echo "[vars]" >> $VDSM_CONFIG #Adding ts for the coming scripts.
        echo "trust_store_path = " `$GETCONFITEM $VDSM_CONFIG vars 
trust_store_path /etc/pki/vdsm` >> $VDSM_CONFIG


--
To view, visit http://gerrit.ovirt.org/8037
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id96224cd61e6cd1e88ca94649b71f2f5f88886c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Fernando Granha Jeronimo <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to