Skip to content

Commit

Permalink
Merge pull request #342 from davidz627/fix/nilMigration
Browse files Browse the repository at this point in the history
Fixed  nil pointer dereference for Migration case
  • Loading branch information
k8s-ci-robot authored Sep 12, 2019
2 parents dfae8d4 + 0a3abe1 commit 61b9e46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ func (p *csiProvisioner) ProvisionExt(options controller.ProvisionOptions) (*v1.
pv.Spec.PersistentVolumeSource.CSI.FSType = fsType
}

klog.V(2).Infof("successfully created PV %v for PVC %v and csi volume name %v", pv.Name, options.PVC.Name, pv.Spec.CSI.VolumeHandle)

if migratedVolume {
pv, err = csitranslationlib.TranslateCSIPVToInTree(pv)
if err != nil {
Expand All @@ -631,7 +633,6 @@ func (p *csiProvisioner) ProvisionExt(options controller.ProvisionOptions) (*v1.
}
}

klog.V(2).Infof("successfully created PV %v for PVC %v and csi volume name %v", pv.Name, options.PVC.Name, pv.Spec.CSI.VolumeHandle)
klog.V(5).Infof("successfully created PV %+v", pv.Spec.PersistentVolumeSource)
return pv, controller.ProvisioningFinished, nil
}
Expand Down

0 comments on commit 61b9e46

Please sign in to comment.