Ignore alarms for standard subcloud upgrade
During a standard subcloud upgrade, an alarm is raised "A configuration change requires a re-apply of cert-manager" soon after controller-1 is upgraded. This alarm blocks VIM upgrade strategy creation which handles upgrade of controller-0. Thus, we ignore this alarm to proceed with the upgrade. Additionally, an info log is updated to print ID's of active alarms which cause VIM strategy creation to fail. Story: 2008055 Task: 41578 Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com> Change-Id: I960aba568e5c0d8aaf37c4e05587092e9b4d069a
This commit is contained in:
parent
d62cffb7a8
commit
36dd77b7a4
|
@ -773,7 +773,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -788,7 +788,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-1']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -803,7 +803,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-2']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -818,7 +818,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-3']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -867,7 +867,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-1']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
},
|
||||
|
@ -932,7 +932,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
}
|
||||
|
@ -1030,7 +1030,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-1']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
},
|
||||
|
@ -1047,7 +1047,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
},
|
||||
|
@ -1062,7 +1062,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -1077,7 +1077,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['storage-1']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 7200}
|
||||
]
|
||||
},
|
||||
|
@ -1176,7 +1176,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-1']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
},
|
||||
|
@ -1193,7 +1193,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
|
|||
{'name': 'unlock-hosts',
|
||||
'entity_names': ['controller-0']},
|
||||
{'name': 'wait-data-sync',
|
||||
'ignore_alarms': ['900.005', '900.201'],
|
||||
'ignore_alarms': ['900.005', '900.201', '750.006'],
|
||||
'timeout': 14400}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -1178,6 +1178,7 @@ class SwUpgradeStrategy(SwUpdateStrategy):
|
|||
# The following alarms will not prevent a software upgrade operation
|
||||
IGNORE_ALARMS = ['900.005', # Upgrade in progress
|
||||
'900.201', # Software upgrade auto apply in progress
|
||||
'750.006', # Configuration change requires reapply of cert-manager
|
||||
]
|
||||
self._ignore_alarms += IGNORE_ALARMS
|
||||
|
||||
|
@ -1519,9 +1520,16 @@ class SwUpgradeStrategy(SwUpdateStrategy):
|
|||
if self._nfvi_alarms:
|
||||
DLOG.warn(
|
||||
"Active alarms found, can't apply software upgrade.")
|
||||
alarm_id_list = ""
|
||||
for alarm_data in self._nfvi_alarms:
|
||||
if alarm_id_list:
|
||||
alarm_id_list += ', '
|
||||
alarm_id_list += alarm_data['alarm_id']
|
||||
DLOG.warn("... active alarms: %s" % alarm_id_list)
|
||||
self._state = strategy.STRATEGY_STATE.BUILD_FAILED
|
||||
self.build_phase.result = strategy.STRATEGY_PHASE_RESULT.FAILED
|
||||
self.build_phase.result_reason = 'active alarms present'
|
||||
self.build_phase.result_reason = 'active alarms present ; '
|
||||
self.build_phase.result_reason += alarm_id_list
|
||||
self.sw_update_obj.strategy_build_complete(
|
||||
False, self.build_phase.result_reason)
|
||||
self.save()
|
||||
|
|
Loading…
Reference in New Issue