Skip to content

Commit

Permalink
rbd: add a check for CSI pv
Browse files Browse the repository at this point in the history
add a check for CSI as it can be
nil for non-csi PV.

fixes: ceph#4807

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 authored and mergify[bot] committed Aug 27, 2024
1 parent 4f357b7 commit 3ac5968
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/rbd/rbd_healer.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ func RunVolumeHealer(ns *NodeServer, conf *util.Config) error {
if pv.Status.Phase != v1.VolumeBound || pv.DeletionTimestamp != nil {
continue
}

if pv.Spec.PersistentVolumeSource.CSI == nil {
continue
}
// skip if mounter is not rbd-nbd
if pv.Spec.PersistentVolumeSource.CSI.VolumeAttributes["mounter"] != "rbd-nbd" {
continue
Expand Down

0 comments on commit 3ac5968

Please sign in to comment.