From dc91317844545872538f91f06d956d8317bde894 Mon Sep 17 00:00:00 2001 From: Sabeel Ansari Date: Fri, 16 Jul 2021 13:35:38 -0400 Subject: [PATCH] Add new cert-alarm service to sm db Added a new cert-alarm service under SM manage in controller-services group. The new service will audit expiring certificates and raise/clear alarms to warn user. Story: 2008946 Task: 42850 Signed-off-by: Sabeel Ansari Change-Id: Icb97157a0235c52c90154e2c45e3de674278e98b --- service-mgmt/sm-db/database/create_sm_db.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service-mgmt/sm-db/database/create_sm_db.sql b/service-mgmt/sm-db/database/create_sm_db.sql index 475cb786..82fd5dbd 100644 --- a/service-mgmt/sm-db/database/create_sm_db.sql +++ b/service-mgmt/sm-db/database/create_sm_db.sql @@ -800,4 +800,14 @@ INSERT INTO "SERVICE_ACTIONS" VALUES('device-image-fs','disable','ocf-script','h INSERT INTO "SERVICE_ACTIONS" VALUES('device-image-fs','audit-enabled','ocf-script','heartbeat','Filesystem','monitor','',2,2,2,60,40); INSERT INTO "SERVICE_ACTIONS" VALUES('device-image-fs','audit-disabled','ocf-script','heartbeat','Filesystem','monitor','',0,0,0,60,40); +INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','controller-services','cert-alarm','major' FROM "SERVICE_GROUP_MEMBERS"; +INSERT INTO "SERVICES" SELECT MAX(id) + 1,'no','cert-alarm','initial','initial','none','none',2,1,90000,4,16,'/var/run/cert-alarm.pid' FROM "SERVICES"; +INSERT INTO "SERVICE_INSTANCES" SELECT MAX(id) + 1,'cert-alarm','cert-alarm','' FROM "SERVICE_INSTANCES"; +INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cert-alarm','not-applicable','enable','fm-mgr','enabled-active'); +INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','fm-mgr','not-applicable','disable','cert-alarm','disabled'); +INSERT INTO "SERVICE_ACTIONS" VALUES('cert-alarm','enable','ocf-script','platform','cert-alarm','start','',2,2,2,30,''); +INSERT INTO "SERVICE_ACTIONS" VALUES('cert-alarm','disable','ocf-script','platform','cert-alarm','stop','',1,1,1,60,''); +INSERT INTO "SERVICE_ACTIONS" VALUES('cert-alarm','audit-enabled','ocf-script','platform','cert-alarm','monitor','',2,2,2,30,40); +INSERT INTO "SERVICE_ACTIONS" VALUES('cert-alarm','audit-disabled','ocf-script','platform','cert-alarm','monitor','',0,0,0,30,40); + COMMIT;