mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: enable expand operation for intree volumes
This commit enable the resize operation[1] for in-tree volumes. new helper has been introduced here to aid the enablement or to make it clean with existing code base. [1] https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/intree-migrate.md?plain=1#L66 Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
f3ed883df9
commit
b9a8d37c3d
@ -1447,9 +1447,7 @@ func (cs *ControllerServer) ControllerExpandVolume(
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
defer cr.DeleteCredentials()
|
||||
|
||||
rbdVol, err := GenVolFromVolID(ctx, volID, cr, req.GetSecrets())
|
||||
defer rbdVol.Destroy()
|
||||
rbdVol, err := genVolFromVolIDWithMigration(ctx, volID, cr, req.GetSecrets())
|
||||
if err != nil {
|
||||
switch {
|
||||
case errors.Is(err, ErrImageNotFound):
|
||||
@ -1463,6 +1461,7 @@ func (cs *ControllerServer) ControllerExpandVolume(
|
||||
|
||||
return nil, err
|
||||
}
|
||||
defer rbdVol.Destroy()
|
||||
|
||||
// NodeExpansion is needed for PersistentVolumes with,
|
||||
// 1. Filesystem VolumeMode with & without Encryption and
|
||||
|
Reference in New Issue
Block a user