expand sw_patch config check to other deploy types
In some cases, the sw_patch service tries to ping the management IP before it's configured, causing a service failure and the 900.002 alarm to be raised. This commit expands a solution that has been implemented for AIO-SX systems to other deploy types. Test Plan: PASS: Successful AIO-SX (VDM) PASS: Successful AIO-DX (VDM) PASS: Successful DC with 1 AIO-SX subcloud (VDM) PASS: Apply patch before bootstrap on AIO-DX (VDM) Partial-bug: 2056295 Change-Id: I6308a91c1149aca4bef78ed175f8e02d6667944e Signed-off-by: mmachado <matheus.machadoguilhermino@windriver.com>
This commit is contained in:
parent
4bf81b7374
commit
c9d1a9f8c6
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue