Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: engine.py: replace sed to setVdsConf
......................................................................
engine.py: replace sed to setVdsConf
Use the standard way to write into vdsm-reg.conf.
Change-Id: I16a0889843feba29abbfb02f3d81293df7f2f3fc
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=890572
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm_reg/engine.py.in
1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/12299/1
diff --git a/vdsm_reg/engine.py.in b/vdsm_reg/engine.py.in
index b506dd5..dec1a99 100644
--- a/vdsm_reg/engine.py.in
+++ b/vdsm_reg/engine.py.in
@@ -119,14 +119,11 @@
else:
log("Agent configuration files already exist.")
- sed_cmd = "sed -i --copy
\"s/\(^vdc_host_name=\)\(..*$\)/vdc_host_name=" +\
- engineHost + "/\" " + VDSM_REG_CONFIG
- if system(sed_cmd):
+ if deployUtil.setVdsConf("vdc_host_name=%s" % engineHost,
VDSM_REG_CONFIG):
log("The @ENGINENAME@'s address is set: %s\n" % engineHost)
if enginePort != "":
- sed_cmd = "sed -i --copy \"s/\(^vdc_host_port=\)\(..*$\)/" \
- "vdc_host_port=" + str(enginePort) + "/\" " +
VDSM_REG_CONFIG
- if system(sed_cmd):
+ if deployUtil.setVdsConf("vdc_host_port=%s" %
+ str(enginePort), VDSM_REG_CONFIG):
log("The @ENGINENAME@'s port set: %s\n" % enginePort)
fWriteConfig = 1
--
To view, visit
http://gerrit.ovirt.org/12299
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I16a0889843feba29abbfb02f3d81293df7f2f3fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>