Merge "expand sw_patch config check to other deploy types"

This commit is contained in:
Zuul 2024-05-06 14:07:54 +00:00 committed by Gerrit Code Review
commit 147e42967c
2 changed files with 4 additions and 13 deletions

View File

@ -138,12 +138,8 @@ def get_mgmt_ip():
# 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
# address will be the correct mgmt IP
try:
if tsc.system_mode == constants.SYSTEM_MODE_SIMPLEX and \
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")
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
return None
mgmt_hostname = socket.gethostname()
return utils.gethostbyname(mgmt_hostname)

View File

@ -86,13 +86,8 @@ def get_mgmt_ip():
# 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
# address will be the correct mgmt IP
try:
if tsc.system_mode == constants.SYSTEM_MODE_SIMPLEX and \
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")
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
return None
mgmt_hostname = socket.gethostname()
return utils.gethostbyname(mgmt_hostname)