Skip to content

Commit

Permalink
Updates Expand volume for replicated vols (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
delldubey authored Jul 5, 2022
1 parent bb9bac3 commit c02d292
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/dell/gocsi v1.6.0
github.com/dell/gofsutil v1.9.0
github.com/dell/goiscsi v1.4.0
github.com/dell/gopowermax v1.8.0
github.com/dell/gopowermax v1.8.1-0.20220704120551-f38d86cfdded
github.com/fsnotify/fsnotify v1.4.9
github.com/golang/protobuf v1.5.2
github.com/kubernetes-csi/csi-lib-utils v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ github.com/dell/goiscsi v1.4.0 h1:TpMo0BLQpHsuUaePHBwZ0yjcq8gXhOOuYeUPzqmwjKk=
github.com/dell/goiscsi v1.4.0/go.mod h1:oDkUXDPAYqSOc0t6PpU+BpOqF45mzv+9eLFRkAoQYKs=
github.com/dell/gonvme v1.1.0 h1:5O554dUsrPEXNEy/mc+977eD1FE0geLYlk5HwuXnAaE=
github.com/dell/gonvme v1.1.0/go.mod h1:qLlZNduxrt1hLR/JaU6OXe8+QkU6dtwa5wHM8EWQ58Y=
github.com/dell/gopowermax v1.8.0 h1:Et02IZjkCTfjUL8vTCmX0pL18hBs54u1ygIuxbpo3zI=
github.com/dell/gopowermax v1.8.0/go.mod h1:rwP7E76NKKl2C+adKe8rDbyfQX4VW041bFbpY0oAKM0=
github.com/dell/gopowermax v1.8.1-0.20220704120551-f38d86cfdded h1:FQuhCARq4oDpEGMrpx9uhMI0wGrj8wgsphUK0CF5xSQ=
github.com/dell/gopowermax v1.8.1-0.20220704120551-f38d86cfdded/go.mod h1:rwP7E76NKKl2C+adKe8rDbyfQX4VW041bFbpY0oAKM0=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
Expand Down
8 changes: 7 additions & 1 deletion service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2941,13 +2941,19 @@ func (s *service) ControllerExpandVolume(
return nil, status.Error(codes.Internal, err.Error())
}

// Check if volume is replicated and has RDF info
var rdfGNo int
if len(vol.RDFGroupIDList) > 0 {
rdfGNo = vol.RDFGroupIDList[0].RDFGroupNumber
}
// log all parameters used in ExpandVolume call
fields := map[string]interface{}{
"RequestID": reqID,
"SymmetrixID": symID,
"VolumeName": volName,
"DeviceID": devID,
"RequestedSize": requestedSize,
"RDF group": rdfGNo,
}
log.WithFields(fields).Info("Executing ExpandVolume with following fields")

Expand All @@ -2967,7 +2973,7 @@ func (s *service) ControllerExpandVolume(
}

//Expand the volume
vol, err = pmaxClient.ExpandVolume(ctx, symID, devID, requestedSize)
vol, err = pmaxClient.ExpandVolume(ctx, symID, devID, rdfGNo, requestedSize)
if err != nil {
log.Errorf("Failed to execute ExpandVolume() with error (%s)", err.Error())
return nil, status.Error(codes.Internal, err.Error())
Expand Down

0 comments on commit c02d292

Please sign in to comment.