Fernando Granha Jeronimo has uploaded a new change for review. Change subject: Avoid race condition with vdsm-reg during firstboot ......................................................................
Avoid race condition with vdsm-reg during firstboot In the vdsm-config script, the vdsm-reg service is disabled to avoid race conditions, once it is intended to be executed just before the node is rebooted and the registration process should take place only after reboot. Change-Id: I2a215bbe6c467d10cf414b09cdaee5340092198e Signed-off-by: Fernando Granha Jeronimo <[email protected]> --- M vdsm_reg/vdsm-config 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/8200/1 diff --git a/vdsm_reg/vdsm-config b/vdsm_reg/vdsm-config index 968d78c..0a030d1 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/8200 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a215bbe6c467d10cf414b09cdaee5340092198e 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
