rbd: log the remote site details during resync

logging the remote site details during resyncing
for better debugging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-10-25 15:58:37 +05:30 committed by mergify[bot]
parent 1fd2f28fee
commit b92a6f5ccb

View File

@ -523,8 +523,6 @@ func (rs *ReplicationServer) DemoteVolume(ctx context.Context,
func checkRemoteSiteStatus(ctx context.Context, mirrorStatus *librbd.GlobalMirrorImageStatus) bool {
ready := true
for _, s := range mirrorStatus.SiteStatuses {
if s.MirrorUUID != "" {
if imageMirroringState(s.State.String()) != unknown && !s.Up {
log.UsefulLog(
ctx,
"peer site mirrorUUID=%s, mirroring state=%s, description=%s and lastUpdate=%s",
@ -532,7 +530,8 @@ func checkRemoteSiteStatus(ctx context.Context, mirrorStatus *librbd.GlobalMirro
s.State.String(),
s.Description,
s.LastUpdate)
if s.MirrorUUID != "" {
if imageMirroringState(s.State.String()) != unknown && !s.Up {
ready = false
}
}