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