util: if FilesystemNodeGetVolumeStats succeeds the volume is healthy

When FilesystemNodeGetVolumeStats() succeeds, the volume must be
healthy. This can be included in the VolumeCondition CSI message by
default.

Checks that detect an abnormal VolumeCondition should prevent calling
FilesystemNodeGetVolumeStats() as it is possible that the function will
hang.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2023-10-17 13:55:38 +02:00 committed by mergify[bot]
parent 7d96cafad7
commit 4d3b1fc46f

View File

@ -312,6 +312,12 @@ func FilesystemNodeGetVolumeStats(
})
}
// include marker for a healthy volume by default
res.VolumeCondition = &csi.VolumeCondition{
Abnormal: false,
Message: "volume is in a healthy condition",
}
return res, nil
}