diff options
| author | joy717 <joy717.xmu@gmail.com> | 2022-04-15 14:36:44 +0800 |
|---|---|---|
| committer | joy717 <joy717.xmu@gmail.com> | 2022-04-15 14:36:44 +0800 |
| commit | 15f316b36bd3f94aa92a9d13156b50daf445d8d4 (patch) | |
| tree | d5e849373c47a5fda4d38d45e798c47c5571a895 /pkg/driver | |
| parent | 83c16cd58b2c252eebded20c3b910cefcab1fb4b (diff) | |
| download | seaweedfs-csi-driver-15f316b36bd3f94aa92a9d13156b50daf445d8d4.tar.xz seaweedfs-csi-driver-15f316b36bd3f94aa92a9d13156b50daf445d8d4.zip | |
fix VolumeExpansion not work
Diffstat (limited to 'pkg/driver')
| -rw-r--r-- | pkg/driver/controllerserver.go | 4 | ||||
| -rw-r--r-- | pkg/driver/nodeserver.go | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go index 535759d..b311732 100644 --- a/pkg/driver/controllerserver.go +++ b/pkg/driver/controllerserver.go @@ -187,11 +187,11 @@ func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi client := mount_pb.NewSeaweedMountClient(clientConn) _, err = client.Configure(context.Background(), &mount_pb.ConfigureRequest{ - CollectionCapacity: req.CapacityRange.LimitBytes, + CollectionCapacity: req.CapacityRange.RequiredBytes, }) return &csi.ControllerExpandVolumeResponse{ - CapacityBytes: req.CapacityRange.LimitBytes, + CapacityBytes: req.CapacityRange.RequiredBytes, }, err } diff --git a/pkg/driver/nodeserver.go b/pkg/driver/nodeserver.go index 1f3ce20..6c6fa19 100644 --- a/pkg/driver/nodeserver.go +++ b/pkg/driver/nodeserver.go @@ -136,7 +136,8 @@ func (ns *NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetC Type: &csi.NodeServiceCapability_Rpc{ Rpc: &csi.NodeServiceCapability_RPC{ // Type: csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME, - Type: csi.NodeServiceCapability_RPC_UNKNOWN, + //Type: csi.NodeServiceCapability_RPC_UNKNOWN, + Type: csi.NodeServiceCapability_RPC_EXPAND_VOLUME, }, }, }, @@ -181,11 +182,11 @@ func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandV client := mount_pb.NewSeaweedMountClient(clientConn) _, err = client.Configure(context.Background(), &mount_pb.ConfigureRequest{ - CollectionCapacity: req.CapacityRange.LimitBytes, + CollectionCapacity: req.CapacityRange.RequiredBytes, }) return &csi.NodeExpandVolumeResponse{ - CapacityBytes: req.CapacityRange.LimitBytes, + CapacityBytes: req.CapacityRange.RequiredBytes, }, err } |
