diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-09-28 13:42:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-28 13:42:55 -0700 |
| commit | 3683a0ae902c0a46bff36e027fa49250dfcbcb36 (patch) | |
| tree | c9aa46efe5977d10c280d850044ed2d942707500 /pkg/driver/controllerserver.go | |
| parent | 597e2c539cf5a87cae1d15be6951c0c8307ef675 (diff) | |
| parent | 5c2298bd215959d78c881e5d48d96569b83ab3c7 (diff) | |
| download | seaweedfs-csi-driver-3683a0ae902c0a46bff36e027fa49250dfcbcb36.tar.xz seaweedfs-csi-driver-3683a0ae902c0a46bff36e027fa49250dfcbcb36.zip | |
Merge pull request #33 from kvaster/static_mounts
Diffstat (limited to 'pkg/driver/controllerserver.go')
| -rw-r--r-- | pkg/driver/controllerserver.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go index 0e07291..c57a72a 100644 --- a/pkg/driver/controllerserver.go +++ b/pkg/driver/controllerserver.go @@ -39,16 +39,8 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol } params := req.GetParameters() - glog.V(4).Info("params:%v", params) + glog.V(4).Infof("params:%v", params) capacity := req.GetCapacityRange().GetRequiredBytes() - capacityGB := capacity >> 30 - if capacityGB == 0 { - return nil, status.Error(codes.InvalidArgument, "required bytes less than 1GB") - } - seaweedFsVolumeCount := capacityGB / 30 - if seaweedFsVolumeCount == 0 { - seaweedFsVolumeCount = 1 - } if err := filer_pb.Mkdir(cs.Driver, "/buckets", volumeId, nil); err != nil { return nil, fmt.Errorf("Error setting bucket metadata: %v", err) @@ -59,7 +51,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ VolumeId: volumeId, - CapacityBytes: capacity, // 0, // seaweedFsVolumeCount * 1024 * 1024 * 30, + CapacityBytes: capacity, VolumeContext: params, }, }, nil |
