Skip to content

rbd-mirror: image status should report remote status#30558

Merged
trociny merged 19 commits intoceph:masterfrom
dillaman:wip-41555
Oct 15, 2019
Merged

rbd-mirror: image status should report remote status#30558
trociny merged 19 commits intoceph:masterfrom
dillaman:wip-41555

Conversation

@dillaman
Copy link

@dillaman dillaman commented Sep 25, 2019

TODO

  • push status from rbd-mirror daemon to remote peer
  • update CLI to show remote peer status
  • fix teuthology tests to handle new status output

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

@dillaman
Copy link
Author

@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.

@tchaikov
Copy link
Contributor

jenkins test make check

@dillaman dillaman force-pushed the wip-41555 branch 13 times, most recently from 79cba56 to 4706c09 Compare October 8, 2019 13:43
Jason Dillaman added 9 commits October 8, 2019 11:16
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>
Jason Dillaman added 10 commits October 8, 2019 11:16
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>
@dillaman dillaman removed the DNM label Oct 9, 2019
@dillaman dillaman changed the title [DNM] rbd-mirror: image status should report remote status rbd-mirror: image status should report remote status Oct 9, 2019
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trociny trociny merged commit a3b1373 into ceph:master Oct 15, 2019
@dillaman dillaman deleted the wip-41555 branch October 15, 2019 13:13
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trociny and @dillaman this change breaks the upgrade test. as we don't check pool_id anymore. see https://tracker.ceph.com/issues/42384

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov I believe it is fixed by #30948

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @trociny ! Jason marked the ticket as a dup.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, @dillaman has already marked it as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants