[NEW PATCH] BZ#725992 - Make sure vdsm-reg runs after every configuration changr (via gerrit-bot)
Yotam Oron
yoron at redhat.com
Thu Aug 25 14:54:51 UTC 2011
New patch submitted by Yotam Oron (yoron at redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/852
commit c8349c277f059e9584020430d74e0c115abfeb6a
Author: Yotam Oron <yoron at redhat.com>
Date: Wed Aug 24 18:09:59 2011 +0300
BZ#725992 - Make sure vdsm-reg runs after every configuration changr
Stop vdsm-reg before the configuration is written, wirte the configuration and start it again.
Change-Id: Id2e546315d6112cb474107fbf974d90366d01982
diff --git a/vdsm_reg/rhevm.py b/vdsm_reg/rhevm.py
index da85f35..9335b61 100755
--- a/vdsm_reg/rhevm.py
+++ b/vdsm_reg/rhevm.py
@@ -31,6 +31,9 @@ from snack import ButtonChoiceWindow, Entry, Grid, Label, Checkbox, \
sys.path.append('/usr/share/vdsm-reg')
import deployUtil
+sys.path.append('/usr/share/vdsm')
+import constants
+
VDSM_CONFIG = "/etc/vdsm/vdsm.conf"
VDSM_REG_CONFIG = "/etc/vdsm-reg/vdsm-reg.conf"
VDC_HOST_PORT = 8443
@@ -162,7 +165,11 @@ class Plugin(PluginBase):
else:
ButtonChoiceWindow(self.ncs.screen, "RHEV-M Configuration", "Failed downloading RHEV-M certificate", buttons = ['Ok'])
self.ncs.reset_screen_colors()
+ # Stopping vdsm-reg may fail but its ok - its in the case when the menus are run after installation
+ deployUtil._logExec([constants.EXT_SERVICE, 'vdsm-reg', 'stop'])
if write_vdsm_config(self.rhevm_server.value(), self.rhevm_server_port.value()):
+ deployUtil._logExec([constants.EXT_SERVICE, 'vdsm-reg',
+ 'start'])
ButtonChoiceWindow(self.ncs.screen, "RHEV-M Configuration", "RHEV-M Configuration Successfully Updated", buttons = ['Ok'])
self.ncs.reset_screen_colors()
return True
More information about the vdsm-patches
mailing list