Merge "Revert "expand sw_patch config check to other deploy types""

This commit is contained in:
Zuul 2024-06-12 21:26:48 +00:00 committed by Gerrit Code Review
commit 13cbc27889
2 changed files with 13 additions and 4 deletions

View File

@ -138,8 +138,12 @@ 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
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
return None
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")
mgmt_hostname = socket.gethostname()
return utils.gethostbyname(mgmt_hostname)

View File

@ -86,8 +86,13 @@ 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
if not os.path.exists(tsc.VOLATILE_CONTROLLER_CONFIG_COMPLETE):
return None
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")
mgmt_hostname = socket.gethostname()
return utils.gethostbyname(mgmt_hostname)