From 4522150c87f635dfdacfbced00174130d39a62c5 Mon Sep 17 00:00:00 2001 From: Jim Gauld Date: Sat, 23 Mar 2024 19:56:04 -0400 Subject: [PATCH] Correct Kubernetes control-plane upgrade robustness skip_update_config This removes the skip_update_config parameter from the _config_apply_runtime_manifest() call when upgrading Kubernetes control-plane. This parameter was unintentially set to True, so this configuration step did not persist. This caused generation of 250.001 config-out-of-date alarms during kube upgrade. The review that introduced the bug: https://review.opendev.org/c/starlingx/config/+/911100 TEST PLAN: - watch /var/log/nfv-vim.log for each orchestrated upgrade PASS: orchestrated k8s upgrade (no faults) - AIO-SX, AIO-DX, Standard PASS: orchestrated k8s upgrade, with fault insertion during control-plane upgrade first attempt - AIO-SX - AIO-DX (both controller-0, controller-1) - Standard (both controller-0, controller-1) PASS: orchestrated k8s upgrade, with fault insertion during control-plane upgrade first and second attempt, trigger abort - AIO-SX - AIO-DX (first controller) Closes-Bug: 2056326 Change-Id: I629c8133312faa5c95d06960b15d3e516e48e4cb Signed-off-by: Jim Gauld --- sysinv/sysinv/sysinv/sysinv/conductor/manager.py | 3 +-- sysinv/sysinv/sysinv/sysinv/tests/conductor/test_manager.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 1c81c4def4..3d47d2f968 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -10271,8 +10271,7 @@ class ConductorManager(service.PeriodicService): puppet_common.REPORT_STATUS_CFG: puppet_common.REPORT_UPGRADE_CONTROL_PLANE } - self._config_apply_runtime_manifest(context, config_uuid, config_dict, - skip_update_config=True) + self._config_apply_runtime_manifest(context, config_uuid, config_dict) def handle_k8s_upgrade_control_plane_success(self, context, kube_upgrade_obj, host_uuid, new_state, fail_state): diff --git a/sysinv/sysinv/sysinv/sysinv/tests/conductor/test_manager.py b/sysinv/sysinv/sysinv/sysinv/tests/conductor/test_manager.py index 40290a0c5c..63089c4751 100644 --- a/sysinv/sysinv/sysinv/sysinv/tests/conductor/test_manager.py +++ b/sysinv/sysinv/sysinv/sysinv/tests/conductor/test_manager.py @@ -1711,7 +1711,7 @@ class ManagerTestCase(base.DbTestCase): } mock_config_apply_runtime_manifest.assert_called_with(mock.ANY, '273cfafd-886d-43ec-9478-8328727b34cc', - config_dict, skip_update_config=True) + config_dict) def test_handle_k8s_upgrade_control_plane_success_first_master(self): # Create controller-0 @@ -1813,7 +1813,7 @@ class ManagerTestCase(base.DbTestCase): } mock_config_apply_runtime_manifest.assert_called_with(mock.ANY, '273cfafd-886d-43ec-9478-8328727b34cc', - config_dict, skip_update_config=True) + config_dict) def test_handle_k8s_upgrade_control_plane_success_second_master(self): # Create controller-0