rbd-mirror: image status should report remote status#30558
rbd-mirror: image status should report remote status#30558trociny merged 19 commits intoceph:masterfrom
Conversation
trociny
left a comment
There was a problem hiding this comment.
@dillaman nit: in "cls/rbd: preliminary support for mirror image status from multiple sites" commit log message when you refer mirror_image_set and mirror_image_get/list methods I suppose you meant mirror_image_status_set and mirror_image_status_get/list?
Indeed -- tweaked. |
|
jenkins test make check |
79cba56 to
4706c09
Compare
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The legacy MirrorPeer format is a RX direction and still requires a client name for connecting to the remote peer. The cluster name has been renamed internally to site name to match the new bootstrap helper. The TX mode peers will be automatically created by remote rbd-mirror instances that ping the local cluster. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Also add the structure to the dencoder test suite. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
It has never been used by RBD mirroring and should be removed. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The mirror_image_status_set method will now accept a MirrorImageSiteStatus structure. When no site name is provided, it is backwards compatible with the original MirorrImageStatus parameter, and when a site name is provided, the setter will fail if not using a new OSD. The mirror_image_status_get/list methods will now return an extended MirrorImageStatus which always includes the local site status and optionally includes the remote site status. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The image status get/list/summary methods now include the status for peers that we can transmit images towards (i.e. remotes can receive images). Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Aggregate up to 100 mirror image status updates into a single RADOS op. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The watcher is required for proper up vs down status and it will simplify future expansion for local vs remote status updates. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
…ates This is in preparation for pulling the periodic status update logic out of the image replayer. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This will register the local site as a peer in the remote for TX-only scenarios. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The image replayer now sends status updates to both the local and remote cluster. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The policy might redirect images to another mirror daemon, so avoid recording a image status error when shutting down. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The mirror peer APIs now include the direction, site name, and last seen timestamp. The mirror image status APIs now include the remote site status for the image. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
| CLS_ERR("peer site name '%s' already exists", | ||
| peer.site_name.c_str()); | ||
| return -EEXIST; | ||
| } else if (!mirror_peer.fsid.empty() && peer.fsid == mirror_peer.fsid) { |
There was a problem hiding this comment.
@trociny and @dillaman this change breaks the upgrade test. as we don't check pool_id anymore. see https://tracker.ceph.com/issues/42384
There was a problem hiding this comment.
thanks @trociny ! Jason marked the ticket as a dup.
There was a problem hiding this comment.
Ah, @dillaman has already marked it as a duplicate.
TODO
rbd-mirrordaemon to remote peer