From b8cf1c2a2e032fa82ba9e51139d7cb124a3f741c Mon Sep 17 00:00:00 2001 From: Austin Sun Date: Tue, 25 Aug 2020 23:10:43 +0800 Subject: [PATCH] Application applied failed due to wrong attribute 'id' Fault Class/Object only has alarm_id, not id which cause sysinv crash like "AttributeError: 'Fault' object has no attribute 'id'" Change-Id: I4aaefc764f5fa13842cd60ee99752e497a3fd439 Closes-bug: 1892830 Signed-off-by: Austin Sun (cherry picked from commit 552b4e01716011ae35b6364716b84f66551adacc) --- sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py b/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py index 8f5f5cb031..4d21a52db4 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py @@ -2104,7 +2104,7 @@ class AppOperator(object): for alarm in self._fm_api.get_faults_by_id( fm_constants.FM_ALARM_ID_APPLICATION_REAPPLY_PENDING) or []: if alarm.entity_instance_id == target_entity: - self._fm_api.clear_fault(alarm.id, + self._fm_api.clear_fault(alarm.alarm_id, alarm.entity_instance_id) def needs_reapply(self, app_name): @@ -2124,7 +2124,7 @@ class AppOperator(object): for alarm in self._fm_api.get_faults_by_id( fm_constants.FM_ALARM_ID_APPLICATION_REAPPLY_PENDING) or []: if alarm.entity_instance_id == target_entity: - self._fm_api.clear_fault(alarm.id, + self._fm_api.clear_fault(alarm.alarm_id, alarm.entity_instance_id) return flag_exists