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 <jagatguruprasad.mishra@windriver.com>
This commit is contained in:
Jagatguru Prasad Mishra 2024-02-02 12:39:09 -05:00
parent d797c9778c
commit da797bbff3
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}
}
}