Hello Yaniv Bronhaim, Antoni Segura Puimedon, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/27320
to review the following change.
Change subject: vdsm-reg: eliminate the VDSMBRIDGE macro
......................................................................
vdsm-reg: eliminate the VDSMBRIDGE macro
VDSMBRIDGE is a historical macro holding the "management bridge" of
Vdsm. Nowadays, this bridge may well not exist as management network are
better kept bridge-less. The concept of "management bridge" is currently
used only within vdsm-reg, and only when it needs to register to a legacy
oVirt-Engine that expects the bridge to exist.
This patch hides the unneeded macro within vdsm-reg, to be completely
dropped when vdsm-reg is replaced by an ovirt-node-register utility.
Change-Id: Iaa1dae084ae9df44c10e0f6ae43584544dab2b8d
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/24814
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Tested-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M configure.ac
M vdsm_reg/deployUtil.py.in
M vdsm_reg/vdsm-reg-setup.in
3 files changed, 11 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/27320/1
diff --git a/configure.ac b/configure.ac
index 8400b0f..485bcf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,9 +143,6 @@
AC_SUBST([vdsmreglogdir], ['${localstatedir}/log/vdsm-reg'])
AC_SUBST([vdsmupgradedir], ['/data/updates'])
-# Network
-AC_SUBST([VDSMBRIDGE], ['ovirtmgmt'])
-
# Engine Name
AC_SUBST([ENGINENAME], ['oVirt Engine'])
diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
index ba45d64..3e16557 100644
--- a/vdsm_reg/deployUtil.py.in
+++ b/vdsm_reg/deployUtil.py.in
@@ -85,7 +85,7 @@
SCRIPT_NAME_ADD = "addNetwork"
SCRIPT_NAME_DEL = "delNetwork"
IFACE_CONFIG = "/etc/sysconfig/network-scripts/ifcfg-"
-MGT_BRIDGE_NAME = "@VDSMBRIDGE@"
+MGT_BRIDGE_NAME = "ovirtmgmt"
REMOTE_SSH_KEY_FILE = ('/engine.ssh.key.txt',)
CORE_DUMP_PATH = '/var/lib/vdsm/core'
CORE_PATTERN = '/proc/sys/kernel/core_pattern'
@@ -470,7 +470,7 @@
def preventDuplicate(bridgeName=None):
"""
- This function checks if the needed bridge (@VDSMBRIDGE@) already exist.
+ This function checks if the needed MGT_BRIDGE_NAME already exist.
"""
if bridgeName is None:
bridgeName = MGT_BRIDGE_NAME
@@ -1005,8 +1005,8 @@
def makeBridge(vdcName, vdsmDir, bridgeName=None):
"""
- Create (for RHEL) or rename (oVirt default bridge) to @VDSMBRIDGE@
- bridge.
+ Create (for RHEL) or rename (oVirt default bridge) to
+ MGT_BRIDGE_NAME.
"""
logging.debug('makeBridge begin.')
if bridgeName is None:
diff --git a/vdsm_reg/vdsm-reg-setup.in b/vdsm_reg/vdsm-reg-setup.in
index 8b40273..b7d1a9b 100644
--- a/vdsm_reg/vdsm-reg-setup.in
+++ b/vdsm_reg/vdsm-reg-setup.in
@@ -4,7 +4,7 @@
# Output: none.
#
# Steps to perform: Initiate Certificate Initalization
-# a. Find menagement bridge and rename it to @VDSMBRIDGE@.
+# a. Find menagement bridge and rename it to MGT_BRIDGE_NAME.
# b. Create .ssh directory and fetch authorized_keys
# c. Call VDC registration.
# d. Set time according to rhev-m time.
@@ -23,12 +23,12 @@
from config import config
import deployUtil
import createDaemon
+from deployUtil import MGT_BRIDGE_NAME
TICKET_RETRIES=3
DEFAULT_CONFIG_FILE="/etc/vdsm-reg/vdsm-reg.conf"
VDSM_CONF="/etc/vdsm/vdsm.conf"
SCRIPT_NAME_SAVE="vdsm-store-net-config"
-MGT_BRIDGE_NAME="@VDSMBRIDGE@"
class Setup:
"""
@@ -76,7 +76,7 @@
def renameBridge(self):
"""
- Rename oVirt default bridge to @VDSMBRIDGE@ bridge.
+ Rename oVirt-node default bridge to MGT_BRIDGE_NAME.
"""
logging.debug("renameBridge begin.")
fReturn = True
@@ -92,8 +92,10 @@
out, err, ret = deployUtil._logExec([os.path.join(self.vdsmDir,
SCRIPT_NAME_SAVE)])
if ret:
fReturn = False
- logging.error("renameBridge Failed to persist @VDSMBRIDGE@
"
- "bridge changes. out=%s\nerr=%s\nret=%d", out,
err,
+ logging.error("renameBridge Failed to persist %s "
+ "bridge changes. out=%s\nerr=%s\nret=%d",
+ MGT_BRIDGE_NAME,
+ out, err,
ret)
except:
fReturn = False
--
To view, visit
http://gerrit.ovirt.org/27320
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa1dae084ae9df44c10e0f6ae43584544dab2b8d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>