From da797bbff3513fb78845c3a0dbee1c51819e6e83 Mon Sep 17 00:00:00 2001 From: Jagatguru Prasad Mishra Date: Fri, 2 Feb 2024 12:39:09 -0500 Subject: [PATCH] fixing high cpu usage of luks service on compute Storage and Compute node going in "degraded" state due to high cpu usage for luks-fs-mgr. Currently the service keeps checking the luks volume status and exits when it is in inactive state. This is a redundant activity as the maintenance code already checks volume status and raises the alarm. This code change exits the main thread of the service on compute and storage nodes after unsealing the volume. Test Plan: PASS: build-pkgs -c -p luks-fs-mgr PASS: build-image PASS: AIO-DX plus: verify if service stops after unsealing luks volume on compute and storage nodes and there is no high cpu usage alarm. PASS: AIO-DX plus: verify if luks service continue running on controller nodes. Story: 2010872 Task: 49517 Change-Id: I7cb2cbf6761b429cb06e5b100e0bfdbfce43f94c Signed-off-by: Jagatguru Prasad Mishra --- filesystem/luks/src/encryption/luks-fs-mgr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filesystem/luks/src/encryption/luks-fs-mgr.cpp b/filesystem/luks/src/encryption/luks-fs-mgr.cpp index 5e589fc40..5f9d79ff6 100644 --- a/filesystem/luks/src/encryption/luks-fs-mgr.cpp +++ b/filesystem/luks/src/encryption/luks-fs-mgr.cpp @@ -1396,6 +1396,9 @@ void monitorLUKSVolume(bool isController, const string& volumeName) { log("Sync failed. Error code: " + to_string(rc), LOG_ERR); break; } + } else { + log("Not a controller node. Exiting the service", LOG_INFO); + break; } } }