rbd: check for peer site status

Do resync if the image is in unknow or in error
state.

Check for the current image state for up+stopped
or up+replaying and also all peer site status
should be un up+stopped to confirm that resyncing
is done and image can be promoted and used.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2021-03-18 12:46:36 +05:30
committed by mergify[bot]
parent 233954bc10
commit 95387c3b5e
2 changed files with 27 additions and 6 deletions

View File

@ -118,6 +118,12 @@ type imageMirrorStatus struct {
State string `json:"state"` // rbd image state
Description string `json:"description"`
LastUpdate string `json:"last_update"`
PeerSites []struct {
SiteName string `json:"site_name"`
State string `json:"state"`
Description string `json:"description"`
LastUpdate string `json:"last_update"`
} `json:"peer_sites"`
}
// FIXME: once https://github.com/ceph/go-ceph/issues/460 is fixed use go-ceph.