mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: operate on dummy image after adding scheduling
currently we are fist operating on the dummy image to refresh the pool and then we are adding the scheduling. we think the scheduling should be added first and than we should refresh the pool. If we do this all the existing schedules will be considered from the scheduler. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
211ca9b5a7
commit
027b68ab39
@ -523,12 +523,6 @@ func (rs *ReplicationServer) PromoteVolume(ctx context.Context,
|
||||
return nil, status.Errorf(codes.Internal, "failed to get mirroring mode %s", err.Error())
|
||||
}
|
||||
|
||||
log.DebugLog(ctx, "Attempting to tickle dummy image for restarting RBD schedules")
|
||||
err = tickleMirroringOnDummyImage(rbdVol, mode)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to enable mirroring on dummy image %s", err.Error())
|
||||
}
|
||||
|
||||
interval, startTime := getSchedulingDetails(req.GetParameters())
|
||||
if interval != admin.NoInterval {
|
||||
err = rbdVol.addSnapshotScheduling(interval, startTime)
|
||||
@ -543,6 +537,12 @@ func (rs *ReplicationServer) PromoteVolume(ctx context.Context,
|
||||
rbdVol)
|
||||
}
|
||||
|
||||
log.DebugLog(ctx, "attempting to tickle dummy image for restarting RBD schedules")
|
||||
err = tickleMirroringOnDummyImage(rbdVol, mode)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to enable mirroring on dummy image %s", err.Error())
|
||||
}
|
||||
|
||||
return &replication.PromoteVolumeResponse{}, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user