update/sw-patch/cgcs-patch/cgcs_patch
Fabiano Correa Mercer 7fef84e36e sw-patch-agent waits the new mgmt IP config
During the management network reconfiguration, the system is restarted
to controller_config script runs the puppet code and update
all services to use the new mgmt IP address.
But the sw-patch services start before the controller_config.
When they start they get the mgmt_ip using the python socket lib that
uses the IP address from the /etc/hosts.
But /etc/hosts at that time is not updated yet, so it get the old
management network IP.
To fix this issue, the sw-patch services will wait for the puppet
code to be applied to make sure the /etc/hosts and new management
network IPs were installed in the system.

Tests done:
IPv4 AIO-SX fresh install
IPv4 AIO-DX fresh install
IPv4 DC with subcloud AIO-SX fresh install
IPv4 AIO-SX mgmt reconfig and apply a non-reboot-required patch
IPv4 AIO-SX mgmt reconfig and apply a reboot-required patch
IPv4 subcloud AIO-SX mgmt reconfig and apply a non-reboot-required patch

IPv4 subcloud AIO-SX mgmt reconfig and apply a reboot-required patch
     For this test the sw-patch was in failed state after the reboot,
     It happens even without the mgmt reconfig and this fix

Partial-Bug: #2060066
Story: 2010722
Task: 49827

Depends-On: https://review.opendev.org/c/starlingx/config/+/914710
Change-Id: Ie544425513ef4fede73b4b55770ad6857cdf7eed
Signed-off-by: Fabiano Correa Mercer <fabiano.correamercer@windriver.com>
2024-04-16 13:01:05 -03:00
..
api Debian: Patch current implementation 2022-05-17 19:34:16 +00:00
authapi Change access control in patching API 2022-10-13 16:30:11 -03:00
templates Debian: Patch current implementation 2022-05-17 19:34:16 +00:00
tests Patch extraction and validation enhancements 2023-12-19 01:42:52 +00:00
__init__.py Fork cgcs-patch package as sw-patch for Debian 2022-03-29 20:35:14 +00:00
app.py Fork cgcs-patch package as sw-patch for Debian 2022-03-29 20:35:14 +00:00
base.py Debian: Minor sw-patch cleanup 2022-07-13 17:54:33 +00:00
certificates.py Fork cgcs-patch package as sw-patch for Debian 2022-03-29 20:35:14 +00:00
config.py sw-patch-agent waits the new mgmt IP config 2024-04-16 13:01:05 -03:00
constants.py sw-patch-agent waits the new mgmt IP config 2024-04-16 13:01:05 -03:00
exceptions.py Patch Remove 2022-05-10 19:39:32 +00:00
messages.py Debian: Patch current implementation 2022-05-17 19:34:16 +00:00
ostree_utils.py Add retry logic for mount 2023-11-29 21:09:06 +00:00
patch_agent.py Fix system raising alarm due to outdated file in memory 2023-09-29 09:25:48 -03:00
patch_client.py Debian: Add compatability for older patches 2022-12-11 15:19:02 +00:00
patch_controller.py Merge "Fix: load-import not feed controller-1" 2024-03-21 13:41:46 +00:00
patch_functions.py Patch extraction and validation enhancements 2023-12-19 01:42:52 +00:00
patch_signing.py Cleanup tox targets for debian patching 2022-04-28 21:35:30 +00:00
patch_verify.py Debian: Fix dev certificate handling for patching 2022-04-05 19:14:57 +00:00
utils.py Minor sw-patch tox cleanup 2022-09-12 16:28:43 +00:00