Merge "expand sw_patch config check to other deploy types"
This commit is contained in:
commit
147e42967c
|
@ -138,12 +138,8 @@ def get_mgmt_ip():
|
||||||
# the management IP for AIO-SX can be reconfigured during the startup.
|
# the management IP for AIO-SX can be reconfigured during the startup.
|
||||||
# Check if /var/run/.<node>_config_complete exists to be sure that IP
|
# Check if /var/run/.<node>_config_complete exists to be sure that IP
|
||||||
# address will be the correct mgmt IP
|
# address will be the correct mgmt IP
|
||||||
try:
|
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
|
||||||
if tsc.system_mode == constants.SYSTEM_MODE_SIMPLEX and \
|
return None
|
||||||
not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
|
|
||||||
return None
|
|
||||||
except Exception:
|
|
||||||
logging.info("not able to get system_mode, continue sw-patch services")
|
|
||||||
|
|
||||||
mgmt_hostname = socket.gethostname()
|
mgmt_hostname = socket.gethostname()
|
||||||
return utils.gethostbyname(mgmt_hostname)
|
return utils.gethostbyname(mgmt_hostname)
|
||||||
|
|
|
@ -86,13 +86,8 @@ def get_mgmt_ip():
|
||||||
# the management IP for AIO-SX can be reconfigured during the startup.
|
# the management IP for AIO-SX can be reconfigured during the startup.
|
||||||
# Check if /var/run/.<node>_config_complete exists to be sure that IP
|
# Check if /var/run/.<node>_config_complete exists to be sure that IP
|
||||||
# address will be the correct mgmt IP
|
# address will be the correct mgmt IP
|
||||||
try:
|
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
|
||||||
if tsc.system_mode == constants.SYSTEM_MODE_SIMPLEX and \
|
return None
|
||||||
not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
|
|
||||||
return None
|
|
||||||
except Exception:
|
|
||||||
logging.info("not able to get system_mode, continue sw-patch services")
|
|
||||||
|
|
||||||
mgmt_hostname = socket.gethostname()
|
mgmt_hostname = socket.gethostname()
|
||||||
return utils.gethostbyname(mgmt_hostname)
|
return utils.gethostbyname(mgmt_hostname)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue