mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +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>
(cherry picked from commit 3ac596840c
)
This commit is contained in:
parent
add317d87e
commit
799acf2d98
@ -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