util: fix bug in health checker

This commit fixes a bug in health checker that
caused shared checker to get keyed with volumeID+volumepath
instead of just volumeID and the other way around
for non-shared checkers.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2025-04-14 16:28:21 +05:30
committed by mergify[bot]
parent 98a2256e4d
commit 86f2ad9e0d
2 changed files with 56 additions and 3 deletions

View File

@ -137,7 +137,8 @@ func (hcm *healthCheckManager) startStatChecker(volumeID, path string, shared bo
// are key'd by theit volumeID+path.
func (hcm *healthCheckManager) startChecker(cc ConditionChecker, volumeID, path string, shared bool) error {
key := volumeID
if shared {
if !shared {
// if it is non-shared checker, try to use the path as well.
key = fallbackKey(volumeID, path)
}