From 591a06e858526f23ccd85e5a684903d0b0e6d156 Mon Sep 17 00:00:00 2001 From: Christopher Souza Date: Fri, 3 Feb 2023 07:57:07 -0300 Subject: [PATCH] Clear 280.003 alarm on subcloud deletion When a subcloud was deleted, the 280.003 alarm was not cleared. The change was to add the 280.003 alarm to the list of alarms that are checked. Test Plan: PASS: Install and bootstrap DC. PASS: create a subcloud backup and power off the subcloud after reaching: "Run subcloud1 backup playbook". PASS: Wait for the alarm 280.003 to be set, then umanage and delete the subcloud and check if the 280.003 alarm was cleared. Closes-bug: 2004638 Signed-off-by: Christopher Souza Change-Id: I70458b1fe6da4b9c0bf458ee57720a4ffaeafbfb --- distributedcloud/dcmanager/manager/subcloud_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/distributedcloud/dcmanager/manager/subcloud_manager.py b/distributedcloud/dcmanager/manager/subcloud_manager.py index 900bc8b2c..c873903bd 100644 --- a/distributedcloud/dcmanager/manager/subcloud_manager.py +++ b/distributedcloud/dcmanager/manager/subcloud_manager.py @@ -1,5 +1,5 @@ # Copyright 2017 Ericsson AB. -# Copyright (c) 2017-2022 Wind River Systems, Inc. +# Copyright (c) 2017-2023 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -1562,12 +1562,15 @@ class SubcloudManager(manager.Manager): # for a subcloud, we manually clear the following: # - subcloud offline # - subloud resource out of sync + # - Subcloud Backup Failure for alarm_id, entity_instance_id in ( (fm_const.FM_ALARM_ID_DC_SUBCLOUD_OFFLINE, "subcloud=%s" % subcloud.name), (fm_const.FM_ALARM_ID_DC_SUBCLOUD_RESOURCE_OUT_OF_SYNC, "subcloud=%s.resource=%s" % - (subcloud.name, dccommon_consts.ENDPOINT_TYPE_DC_CERT))): + (subcloud.name, dccommon_consts.ENDPOINT_TYPE_DC_CERT)), + (fm_const.FM_ALARM_ID_DC_SUBCLOUD_BACKUP_FAILED, + "subcloud=%s" % subcloud.name)): try: fault = self.fm_api.get_fault(alarm_id, entity_instance_id)