mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
rbd: add a check for CSI pv
add a check for CSI as it can be nil for non-csi PV. fixes: #4807 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
4f357b7e27
commit
3ac596840c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user