mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rbd: split mirror functions off into rbdMrror type
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
af4431f60b
commit
b0994a5356
@ -1024,7 +1024,14 @@ func (cs *ControllerServer) DeleteVolume(
|
||||
func cleanupRBDImage(ctx context.Context,
|
||||
rbdVol *rbdVolume, cr *util.Credentials,
|
||||
) (*csi.DeleteVolumeResponse, error) {
|
||||
info, err := rbdVol.GetMirroringInfo(ctx)
|
||||
rm, err := rbdVol.ToMirror()
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
info, err := rm.GetMirroringInfo(ctx)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
@ -1043,7 +1050,7 @@ func cleanupRBDImage(ctx context.Context,
|
||||
// the image on all the remote (secondary) clusters will get
|
||||
// auto-deleted. This helps in garbage collecting the OMAP, PVC and PV
|
||||
// objects after failback operation.
|
||||
sts, rErr := rbdVol.GetGlobalMirroringStatus(ctx)
|
||||
sts, rErr := rm.GetGlobalMirroringStatus(ctx)
|
||||
if rErr != nil {
|
||||
return nil, status.Error(codes.Internal, rErr.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user