Skip to content

Commit

Permalink
util: if FilesystemNodeGetVolumeStats succeeds the volume is healthy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nixpanic committed Oct 30, 2023
1 parent 0a1c5d7 commit e72b358
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/csi-common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e72b358

Please sign in to comment.