Merge "controllerfs-modify failed due to ialarm_get_all error"
This commit is contained in:
commit
08010aff21
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue