From d730d8edc291a7a2f247f873359c832ad3909d36 Mon Sep 17 00:00:00 2001 From: Yuxing Jiang Date: Thu, 1 Feb 2024 10:37:44 -0500 Subject: [PATCH] Ignore PTP alarm in vim strategies This commit ignores the PTP alarm for SyncE in all the vim strategies as it should not impact related operations. Test-plan: 1. Manually raise 100.119 alarm by fmClientCli 2. Verify kube-rootca-update and system-config-update strategies can be created/applied/deleted successfully along with the 100.119 alarm. Closes-bug: 2051950 Change-Id: Ie2cc570c28de95802ff1b88e30f3c9f562b3c892 Signed-off-by: Yuxing Jiang --- .../tests/test_sw_patch_strategy.py | 20 ++++++++---- .../tests/test_sw_upgrade_strategy.py | 32 +++++++++---------- nfv/nfv-vim/nfv_vim/strategy/_strategy.py | 8 ++++- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py b/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py index b41f9d86..114b30a1 100755 --- a/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py +++ b/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2023 Wind River Systems, Inc. +# Copyright (c) 2016-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -2700,7 +2700,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] }, @@ -2721,7 +2722,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] } @@ -2824,7 +2826,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] }, @@ -2846,7 +2849,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] }, @@ -2868,7 +2872,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] }, @@ -2890,7 +2895,8 @@ class TestSwPatchStrategy(sw_update_testcase.SwUpdateStrategyTestCase): '900.101', '200.001', '700.004', - '280.002'], + '280.002', + '100.119'], 'timeout': 1800} ] }, diff --git a/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_upgrade_strategy.py b/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_upgrade_strategy.py index 7cbb61e9..55e6a3d4 100755 --- a/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_upgrade_strategy.py +++ b/nfv/nfv-tests/nfv_unit_tests/tests/test_sw_upgrade_strategy.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2023 Wind River Systems, Inc. +# Copyright (c) 2016-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -1022,7 +1022,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-0']}, _unlock_hosts_stage_as_dict(['storage-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1036,7 +1036,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-1']}, _unlock_hosts_stage_as_dict(['storage-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1050,7 +1050,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-2']}, _unlock_hosts_stage_as_dict(['storage-2']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1064,7 +1064,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-3']}, _unlock_hosts_stage_as_dict(['storage-3']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1112,7 +1112,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-0']}, _unlock_hosts_stage_as_dict(['controller-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] } @@ -1159,7 +1159,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-1']}, _unlock_hosts_stage_as_dict(['controller-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1175,7 +1175,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-0']}, _unlock_hosts_stage_as_dict(['controller-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] } @@ -1246,7 +1246,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-0']}, _unlock_hosts_stage_as_dict(['controller-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1262,7 +1262,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-1']}, _unlock_hosts_stage_as_dict(['controller-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1363,7 +1363,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-1']}, _unlock_hosts_stage_as_dict(['controller-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1377,7 +1377,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-0']}, _unlock_hosts_stage_as_dict(['controller-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1391,7 +1391,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-0']}, _unlock_hosts_stage_as_dict(['storage-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1405,7 +1405,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['storage-1']}, _unlock_hosts_stage_as_dict(['storage-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 7200} ] }, @@ -1501,7 +1501,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-1']}, _unlock_hosts_stage_as_dict(['controller-1']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, @@ -1517,7 +1517,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase): 'entity_names': ['controller-0']}, _unlock_hosts_stage_as_dict(['controller-0']), {'name': 'wait-data-sync', - 'ignore_alarms': ['900.005', '900.201', '750.006'], + 'ignore_alarms': ['900.005', '900.201', '750.006', '100.119'], 'timeout': 14400} ] }, diff --git a/nfv/nfv-vim/nfv_vim/strategy/_strategy.py b/nfv/nfv-vim/nfv_vim/strategy/_strategy.py index ec81a475..464a94d1 100755 --- a/nfv/nfv-vim/nfv_vim/strategy/_strategy.py +++ b/nfv/nfv-vim/nfv_vim/strategy/_strategy.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2023 Wind River Systems, Inc. +# Copyright (c) 2015-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -1390,6 +1390,7 @@ class SwPatchStrategy(SwUpdateStrategy, '200.001', # Maintenance host lock alarm '700.004', # VM stopped '280.002', # Subcloud resource out-of-sync + '100.119', # PTP alarm for SyncE ] self._ignore_alarms += IGNORE_ALARMS self._single_controller = single_controller @@ -1739,6 +1740,7 @@ class SwUpgradeStrategy(SwUpdateStrategy): IGNORE_ALARMS = ['900.005', # Upgrade in progress '900.201', # Software upgrade auto apply in progress '750.006', # Configuration change requires reapply of cert-manager + '100.119', # PTP alarm for SyncE ] self._ignore_alarms += IGNORE_ALARMS self._single_controller = single_controller @@ -2332,6 +2334,7 @@ class SystemConfigUpdateStrategy(SwUpdateStrategy, # The following alarms will not prevent a system config update operation IGNORE_ALARMS = ['100.103', # Memory threshold exceeded + '100.119', # PTP alarm for SyncE '200.001', # Locked Host '250.001', # System Config out of date '260.001', # Unreconciled resource @@ -2526,6 +2529,7 @@ class FwUpdateStrategy(SwUpdateStrategy): '900.006', # Device Image Update in progress '900.301', # Fw Update Auto Apply in progress '200.001', # Locked Host + '100.119', # PTP alarm for SyncE ] self._ignore_alarms += IGNORE_ALARMS @@ -2883,6 +2887,7 @@ class KubeRootcaUpdateStrategy(SwUpdateStrategy, # todo(abailey): remove memory alarm from this list if possible IGNORE_ALARMS = [ '100.103', # Memory threshold exceeded + '100.119', # PTP alarm for SyncE '200.001', # Locked Host '280.001', # Subcloud resource off-line '280.002', # Subcloud resource out-of-sync @@ -3286,6 +3291,7 @@ class KubeUpgradeStrategy(SwUpdateStrategy, # todo(abailey): remove memory alarm from this list if possible IGNORE_ALARMS = [ '100.103', # Memory threshold exceeded + '100.119', # PTP alarm for SyncE '200.001', # Locked Host '280.001', # Subcloud resource off-line '280.002', # Subcloud resource out-of-sync