Skip to content

Commit 723dc22

Browse files
authored
Merge pull request kubernetes-csi#1115 from leonardoce/fix-vgs
Look for a VolumeGroupSnapshotClass when getting the class of a VolumeGroupSnapshot
2 parents aca6768 + 1226227 commit 723dc22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/common-controller/groupsnapshot_controller_helper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ func (ctrl *csiSnapshotCommonController) removeGroupSnapshotFinalizer(groupSnaps
13711371
// getGroupSnapshotDriverName is a helper function to get driver from the VolumeGroupSnapshot.
13721372
// We try to get the driverName in multiple ways, as snapshot controller metrics depend on the correct driverName.
13731373
func (ctrl *csiSnapshotCommonController) getGroupSnapshotDriverName(vgs *crdv1alpha1.VolumeGroupSnapshot) (string, error) {
1374-
klog.V(5).Infof("getSnapshotDriverName: VolumeSnapshot[%s]", vgs.Name)
1374+
klog.V(5).Infof("getGroupSnapshotDriverName: VolumeGroupSnapshot[%s]", vgs.Name)
13751375
var driverName string
13761376

13771377
// Pre-Provisioned groupsnapshots have contentName as source
@@ -1396,9 +1396,9 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotDriverName(vgs *crdv1al
13961396

13971397
// Dynamic groupsnapshots will have a groupsnapshotclass with a driver
13981398
if vgs.Spec.VolumeGroupSnapshotClassName != nil {
1399-
class, err := ctrl.getSnapshotClass(*vgs.Spec.VolumeGroupSnapshotClassName)
1399+
class, err := ctrl.getGroupSnapshotClass(*vgs.Spec.VolumeGroupSnapshotClassName)
14001400
if err != nil {
1401-
klog.Errorf("getGroupSnapshotDriverName: failed to get groupsnapshotClass: %v", *vgs.Spec.VolumeGroupSnapshotClassName)
1401+
klog.Errorf("getGroupSnapshotDriverName: failed to get groupSnapshotClass: %v", *vgs.Spec.VolumeGroupSnapshotClassName)
14021402
} else {
14031403
driverName = class.Driver
14041404
}

0 commit comments

Comments
 (0)