From 085d86e4a3aee61301a096d5bf16390967a25dfb Mon Sep 17 00:00:00 2001 From: Fabiano Correa Mercer Date: Mon, 11 Dec 2023 13:29:03 -0300 Subject: [PATCH] Updates after the mgmt network reconfiguration In the first reboot after the management network reconfiguration, the system is still using the old mgmt IPs until the apply_network_config.sh and puppet code updates the system. The sw-patch services starts before or at same time of these operations and can use the old MGMT IPs and failed to answer audit requests. For this reason the sw-patch services must start just after the controller config is completed. Tests: IPv6 mgmt network reconfig in subcloud AIO-SX IPv4 mgmt network reconfig in standalone AIO-SX AIO-DX Fresh install AIO-SX Fresh install AIO-SX IPv4 apply patch after mgmt reconfig AIO-SX IPv4 apply patch-local before bootstrap Story: 2010722 Task: 49227 Depends-On: https://review.opendev.org/c/starlingx/config/+/902132 Change-Id: I61cbf24574184dafd0e2e7a80363fecdfa99b5a6 Signed-off-by: Fabiano Correa Mercer --- sw-patch/cgcs-patch/cgcs_patch/patch_controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py b/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py index 1f099a19..d6b86095 100644 --- a/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py +++ b/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py @@ -59,6 +59,7 @@ import cgcs_patch.messages as messages import cgcs_patch.constants as constants from tsconfig.tsconfig import INITIAL_CONFIG_COMPLETE_FLAG +from tsconfig.tsconfig import VOLATILE_CONTROLLER_CONFIG_COMPLETE CONF = oslo_cfg.CONF @@ -2420,9 +2421,12 @@ class PatchControllerAuthApiThread(threading.Thread): host = utils.get_versioned_address_all() try: # Can only launch authenticated server post-config - while not os.path.exists('/etc/platform/.initial_config_complete'): + while not os.path.exists(VOLATILE_CONTROLLER_CONFIG_COMPLETE): + LOG.info("Authorized API: Waiting for controller config complete.") time.sleep(5) + LOG.info("Authorized API: Initializing") + # In order to support IPv6, server_class.address_family must be # set to the correct address family. Because the unauthenticated # API always uses IPv4 for the loopback address, the address_family