diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py index 24e4edfb5e..a024391600 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py @@ -369,6 +369,7 @@ def _check_controller_state(): # as the resize itself will clear the degrade. health_helper = health.Health(pecan.request.dbapi) degrade_alarms = health_helper.get_alarms_degrade( + pecan.request.context, alarm_ignore_list=[fm_constants.FM_ALARM_ID_FS_USAGE], entity_instance_id_filter="controller-") allowed_resize = False diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py index 3c8fcf4ada..a877764721 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py @@ -5312,6 +5312,7 @@ class HostController(rest.RestController): constants.AVAILABILITY_DEGRADED): health_helper = health.Health(pecan.request.dbapi) degrade_alarms = health_helper.get_alarms_degrade( + pecan.request.context, alarm_ignore_list=[ fm_constants.FM_ALARM_ID_HA_SERVICE_GROUP_STATE, fm_constants.FM_ALARM_ID_HA_SERVICE_GROUP_REDUNDANCY, diff --git a/sysinv/sysinv/sysinv/sysinv/common/health.py b/sysinv/sysinv/sysinv/sysinv/common/health.py index 467bfdfef9..8ed8a065e7 100755 --- a/sysinv/sysinv/sysinv/sysinv/common/health.py +++ b/sysinv/sysinv/sysinv/sysinv/common/health.py @@ -121,10 +121,10 @@ class Health(object): return success, allowed, affecting - def get_alarms_degrade(self, alarm_ignore_list=[], + def get_alarms_degrade(self, context, alarm_ignore_list=[], entity_instance_id_filter=""): """Return all the alarms that cause the degrade""" - db_alarms = self._dbapi.ialarm_get_all(include_suppress=True) + db_alarms = fmclient(context).alarm.list(include_suppress=True) degrade_alarms = [] for db_alarm in db_alarms: