mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-02-16 23:59:29 +00:00
Merge pull request #254 from Madhu-1/fix-252-
store volume size in bytes in configmap
This commit is contained in:
commit
c5ff1ba724
@ -181,6 +181,9 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// store volume size in bytes (snapshot and check existing volume needs volume
|
||||||
|
// size in bytes)
|
||||||
|
rbdVol.VolSize = rbdVol.VolSize * util.MiB
|
||||||
|
|
||||||
rbdVolumes[rbdVol.VolID] = rbdVol
|
rbdVolumes[rbdVol.VolID] = rbdVol
|
||||||
|
|
||||||
@ -191,7 +194,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
|||||||
return &csi.CreateVolumeResponse{
|
return &csi.CreateVolumeResponse{
|
||||||
Volume: &csi.Volume{
|
Volume: &csi.Volume{
|
||||||
VolumeId: rbdVol.VolID,
|
VolumeId: rbdVol.VolID,
|
||||||
CapacityBytes: rbdVol.VolSize * util.MiB,
|
CapacityBytes: rbdVol.VolSize,
|
||||||
VolumeContext: req.GetParameters(),
|
VolumeContext: req.GetParameters(),
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user