mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: remove redundant rbdVolume.connect() in flattenRbdImage()
This commit removes `rv.Connect(cr)` since the rbdVolume should have an active connection in this stage of the function call. `rv.getCloneDepth(ctx)` will work after a connect to the cluster. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
ad3c334a3a
commit
7b0f051fd4
@ -871,10 +871,6 @@ func (rv *rbdVolume) flattenRbdImage(
|
||||
"task manager does not support flatten,image will be flattened once hardlimit is reached: %v",
|
||||
err)
|
||||
if forceFlatten || depth >= hardlimit {
|
||||
err = rv.Connect(cr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err := rv.flatten()
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "rbd failed to flatten image %s %s: %v", rv.Pool, rv.RbdImageName, err)
|
||||
|
Loading…
Reference in New Issue
Block a user