From 2fb32cf88dd26dc934063f154d37941d62412f16 Mon Sep 17 00:00:00 2001 From: Fabiano Correa Mercer Date: Fri, 15 Mar 2024 10:31:25 -0300 Subject: [PATCH] Allow mgmt and admin network reconfig This change allows the management and admin network reconfig at same time in an AIO-DX subcloud. Currently, it is necessary to lock and unlock the controller in order to reconfigure the management network from AIO-SX. If the customer changes the management network fist, the new mgmt network will be in the database but the changes will jsut be applied during the unlock / reboot of the system. But the admin network changes are applied in runtime, if the admin network is changed after the management network reconfig, the admin will apply the changes on the system and some of them will apply the new mgmt network values before the system is updated with the new mgmt ip range, it will cause a puppet error and the system will not be correctly configured. Tests done: IPv4 AIO-SX subcloud mgmt network reconfig IPv4 AIO-SX subcloud admin network reconfig IPv4 AIO-SX subcloud admin and mgmt network reconfig IPv4 AIO-SX subcloud mgmt and admin network reconfig Story: 2010722 Task: 49724 Change-Id: I113eab2618f34b305cb7c4ee9bb129597f3898bb Signed-off-by: Fabiano Correa Mercer --- sysinv/sysinv/sysinv/sysinv/conductor/manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 9b4833b0ff..4b7717c846 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -9648,6 +9648,11 @@ class ConductorManager(service.PeriodicService): personalities, host_uuids=[host.uuid]) + if os.path.isfile(tsc.MGMT_NETWORK_RECONFIGURATION_ONGOING): + LOG.info("Admin network changes will be applied after the next " + "host-unlock due to Management Network reconfiguration.") + return + if disable: # Note: The SNAT LDAP rule will be removed before the address # pool deletion. No need to do it here.