aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver/controllerserver.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-07-01 02:19:02 -0700
committerGitHub <noreply@github.com>2022-07-01 02:19:02 -0700
commit3a5a3406256bc10263f0815baef112a19b62556b (patch)
treeec08f9e968af823d73c16327b86f79707e198eab /pkg/driver/controllerserver.go
parent27586e9139d4bacf1d37525a2fb7726f472931f4 (diff)
parent96d415ad3e121518552629f31a7cbe6eee9c76e4 (diff)
downloadseaweedfs-csi-driver-3a5a3406256bc10263f0815baef112a19b62556b.tar.xz
seaweedfs-csi-driver-3a5a3406256bc10263f0815baef112a19b62556b.zip
Merge pull request #66 from garenchan/ck-dev1
Fix error when managing multiple volumes
Diffstat (limited to 'pkg/driver/controllerserver.go')
-rw-r--r--pkg/driver/controllerserver.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go
index b311732..6a8585c 100644
--- a/pkg/driver/controllerserver.go
+++ b/pkg/driver/controllerserver.go
@@ -49,9 +49,6 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
}
glog.V(4).Infof("params:%v", params)
capacity := req.GetCapacityRange().GetRequiredBytes()
- cs.Driver.Capacity = capacity
- cs.Driver.DiskType = params["diskType"]
-
if capacity > 0 {
glog.V(4).Infof("volume capacity: %d", capacity)
params["volumeCapacity"] = strconv.FormatInt(capacity, 10)
@@ -178,8 +175,11 @@ func (cs *ControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnap
}
func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
+ volumeID := req.GetVolumeId()
+ glog.V(0).Infof("Controller expand volume %s to %d bytes", volumeID, req.CapacityRange.RequiredBytes)
- clientConn, err := grpc.Dial("passthrough:///unix://"+cs.Driver.mountSocket, grpc.WithTransportCredentials(insecure.NewCredentials()))
+ localSocket := GetLocalSocket(volumeID)
+ clientConn, err := grpc.Dial("passthrough:///unix://"+localSocket, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}