From a891bdcfd0dab12a859f711b99475228ceef1423 Mon Sep 17 00:00:00 2001 From: Enzo Candotti Date: Wed, 26 Apr 2023 15:18:56 -0300 Subject: [PATCH] Add alarm id for resources out of sync This commit adds a new alarm id and definition for resources that has INSYNC=False. The alarm will be raised when a resource is not synchronized during a process of update. It will be cleared when the resource is synchronized again. Test Plan: - Verify successful tox test and package build - Verify the alarm can be raised using FmClientCli Story: 2010719 Task: 47910 Change-Id: I24a976ed4beaa8248df25fd97eeee27f5754b969 Signed-off-by: Enzo Candotti --- fm-api/source/fm_api/constants.py | 6 ++++++ fm-doc/fm_doc/events.yaml | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/fm-api/source/fm_api/constants.py b/fm-api/source/fm_api/constants.py index 0b5f04c5..cc06ba0c 100755 --- a/fm-api/source/fm_api/constants.py +++ b/fm-api/source/fm_api/constants.py @@ -51,6 +51,7 @@ ALARM_GROUP_GENERAL = "100" ALARM_GROUP_MAINTENANCE = "200" ALARM_GROUP_BACKUP_RESTORE = "210" ALARM_GROUP_SYSCONFIG = "250" +ALARM_GROUP_DEPLOYMENT_MANAGER = "260" ALARM_GROUP_HOST_SERVICES = "270" ALARM_GROUP_HYPERVISOR = "275" ALARM_GROUP_DISTRIBUTED_CLOUD = "280" @@ -112,6 +113,11 @@ FM_ALARM_ID_STORAGE_BACKEND_FAILED = ALARM_GROUP_STORAGE + ".104" # Kubernetes Resource Alarms FM_ALARM_ID_K8S_RESOURCE_PV = ALARM_GROUP_K8S + ".001" +# Deployment Manager Monitor alarm id + +FM_ALARM_ID_UNRECONCILED_RESOURCE = ALARM_GROUP_DEPLOYMENT_MANAGER + ".001" +FM_ALARM_ID_UNSYNCHRONIZED_RESOURCE = ALARM_GROUP_DEPLOYMENT_MANAGER + ".002" + # Host-Services log id FM_LOG_ID_HOST_SERVICES_FAILED = ALARM_GROUP_HOST_SERVICES + ".101" FM_LOG_ID_HOST_SERVICES_ENABLED = ALARM_GROUP_HOST_SERVICES + ".102" diff --git a/fm-doc/fm_doc/events.yaml b/fm-doc/fm_doc/events.yaml index 2506d4af..519cf373 100755 --- a/fm-doc/fm_doc/events.yaml +++ b/fm-doc/fm_doc/events.yaml @@ -983,6 +983,22 @@ Degrade_Affecting_Severity: none Context: starlingx +260.002: + Type: Alarm + Description: "Deployment Manager resource not synchronized: " + Entity_Instance_ID: resource=,name= + Severity: minor + Proposed_Repair_Action: Monitor and if condition persists, validate deployment configuration. + Maintenance_Action: + Inhibit_Alarms: + Alarm_Type: operational-violation + Probable_Cause: configuration-out-of-date + Service_Affecting: False + Suppression: True + Management_Affecting_Severity: warning + Degrade_Affecting_Severity: none + Context: starlingx + #--------------------------------------------------------------------------- # VM Compute Services #---------------------------------------------------------------------------