Fix issue with stale alarm
When the VIM attempts to clear an alarm, but the request to FM fails, the VIM is leaving the alarm in its internal list of raised alarms. The next time the VIM's alarm audit runs, it will see that the alarm is not raised and raise it. The alarm will then be stuck. The fix is to always remove the alarm from the list - even if FM fails to clear the alarm. The VIM's alarm audit will then clear the alarm because it will find an alarm in FM that is not in the VIM's alarm list. Change-Id: I011d17c00364601400cbd770ed31077e364f2c9f
This commit is contained in:
parent
ad8c7d1d2b
commit
fb8ad39bc1
|
@ -1 +1 @@
|
|||
TIS_PATCH_VER=72
|
||||
TIS_PATCH_VER=73
|
||||
|
|
|
@ -189,10 +189,12 @@ class FaultManagement(alarm_handlers_v1.AlarmHandler):
|
|||
fm_alarm_id = _fm_alarm_id_mapping[alarm_data.alarm_type]
|
||||
success = self._fm_api.clear_fault(fm_alarm_id, alarm_data.entity)
|
||||
if success:
|
||||
del self._alarm_db[alarm_uuid]
|
||||
DLOG.info("Cleared alarm, uuid=%s." % alarm_uuid)
|
||||
else:
|
||||
DLOG.error("Failed to clear alarm, uuid=%s." % alarm_uuid)
|
||||
# Always remove the alarm from our alarm db. If we failed to clear
|
||||
# the alarm, the audit will clear it later.
|
||||
del self._alarm_db[alarm_uuid]
|
||||
|
||||
def audit_alarms(self):
|
||||
DLOG.debug("Auditing alarms.")
|
||||
|
|
Loading…
Reference in New Issue