mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +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 {
|
if pv.Status.Phase != v1.VolumeBound || pv.DeletionTimestamp != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pv.Spec.PersistentVolumeSource.CSI == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
// skip if mounter is not rbd-nbd
|
// skip if mounter is not rbd-nbd
|
||||||
if pv.Spec.PersistentVolumeSource.CSI.VolumeAttributes["mounter"] != "rbd-nbd" {
|
if pv.Spec.PersistentVolumeSource.CSI.VolumeAttributes["mounter"] != "rbd-nbd" {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user