Skip to content

rgw: add 'bucket sync checkpoint' command to radosgw-admin - #36482

Merged
cbodley merged 7 commits into
ceph:masterfrom
cbodley:wip-rgw-bucket-sync-checkpoint
Sep 25, 2020
Merged

cbodley merged 7 commits into
ceph:masterfrom
cbodley:wip-rgw-bucket-sync-checkpoint

Conversation

@cbodley

@cbodley cbodley commented Aug 5, 2020

Copy link
Copy Markdown
Contributor

Adds a consistency checkpoint command for bucket sync. This fetches the state of the bucket's sources from a remote zone, then polls the local zone's sync status until it catches up.

This command is then used directly in our multisite tests to implement zone_bucket_checkpoint().

[zone a1] $ radosgw-admin bucket sync checkpoint --bucket testbucket --source-zone a2
2020-08-05T13:44:00.975-0400 7fcb766b5980  1 waiting for incremental sync to catch up:
      local status: [00000000004.8.5]
    remote markers: [00000000008.18.5]
2020-08-05T13:44:05.977-0400 7fcb766b5980  1 waiting for incremental sync to catch up:
      local status: [00000000004.8.5]
    remote markers: [00000000008.18.5]
2020-08-05T13:44:10.980-0400 7fcb766b5980  1 waiting for incremental sync to catch up:
      local status: [00000000004.8.5]
    remote markers: [00000000008.18.5]
2020-08-05T13:44:15.982-0400 7fcb766b5980  1 bucket sync caught up with source:
      local status: [00000000008.18.5]
    remote markers: [00000000008.18.5]
2020-08-05T13:44:15.982-0400 7fcb766b5980  0 bucket checkpoint complete

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@yehudasa yehudasa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@cbodley see my comments. All in all ok.

Comment thread src/rgw/rgw_admin.cc Resolved
Comment thread src/rgw/rgw_admin.cc Resolved
@cbodley
cbodley force-pushed the wip-rgw-bucket-sync-checkpoint branch from 7a1cb1f to f4c2703 Compare August 12, 2020 13:09
@cbodley

cbodley commented Aug 12, 2020

Copy link
Copy Markdown
Contributor Author

updates:

  • moved checkpoint code into new rgw_sync_checkpoint.*
  • fixed marker comparison logic
  • enabled optional_yield for remote_bilog_markers()
  • initial steps (fetching remote markers and reading bucket info for each source) are done in parallel using optional_yield

@adamemerson adamemerson self-assigned this Aug 28, 2020
@adamemerson

Copy link
Copy Markdown
Contributor

Jenkins, recheck this please

@adamemerson

Copy link
Copy Markdown
Contributor

This needs a fix to pass run-cli-tests

diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t
index 220d5da7b0c..3a868d7d4ba 100644
--- a/src/test/cli/radosgw-admin/help.t
+++ b/src/test/cli/radosgw-admin/help.t
@@ -29,6 +29,7 @@
     bucket chown               link bucket to specified user and update its object ACLs
     bucket reshard             reshard bucket
     bucket rewrite             rewrite all objects in the specified bucket
+    bucket sync checkpoint     poll a bucket's sync status until it catches up to its remote
     bucket sync disable        disable bucket sync
     bucket sync enable         enable bucket sync
     bucket radoslist           list rados objects backing bucket's objects

@adamemerson

Copy link
Copy Markdown
Contributor

@cbodley

cbodley commented Aug 31, 2020

Copy link
Copy Markdown
Contributor Author

thanks @adamemerson! i'll push an update for help.t. the test_bucket_creation_time fix in #36743 hasn't merged yet

@cbodley
cbodley force-pushed the wip-rgw-bucket-sync-checkpoint branch from f4c2703 to 7d92512 Compare August 31, 2020 17:58
@cbodley

cbodley commented Aug 31, 2020

Copy link
Copy Markdown
Contributor Author

rebased and amended help.t accordingly

@cbodley
cbodley force-pushed the wip-rgw-bucket-sync-checkpoint branch 2 times, most recently from 3e46ba7 to 6724780 Compare September 3, 2020 18:44
@cbodley

cbodley commented Sep 4, 2020

Copy link
Copy Markdown
Contributor Author

@cbodley

cbodley commented Sep 4, 2020

Copy link
Copy Markdown
Contributor Author

this is ready for another round of review!

…oint

the bucket checkpoints rely on the existence of the bucket's entrypoint,
which only syncs via metadata sync. add meta checkpoints before any bucket
checkpoints to fix spurious failures like this:

> radosgw-admin --log-to-stderr --format json -n client.0 --cluster c1 bucket sync checkpoint --bucket fievzp-46 --source-zone a1 --retry-delay-ms 5000 --timeout-sec 300 --rgw-zone a2 --rgw-zonegroup a --rgw-realm test-realm --cluster c1 --debug-rgw 1 --debug-ms 0
2020-09-03T16:24:53.986 INFO:teuthology.orchestra.run.smithi055.stderr:ignoring --setuser ceph since I am not root
2020-09-03T16:24:53.987 INFO:teuthology.orchestra.run.smithi055.stderr:ignoring --setgroup ceph since I am not root
2020-09-03T16:24:54.178 INFO:teuthology.orchestra.run.smithi055.stderr:could not get bucket info for bucket=fievzp-46
2020-09-03T16:24:54.211 DEBUG:teuthology.orchestra.run:got remote process result: 2
2020-09-03T16:24:54.213 INFO:tasks.rgw_multisite_tests:tasks.rgw_multi.tests.test_bucket_sync_enable_right_after_disable ... FAIL

Signed-off-by: Casey Bodley <[email protected]>
@cbodley
cbodley force-pushed the wip-rgw-bucket-sync-checkpoint branch from 6724780 to d22a5cd Compare September 15, 2020 17:10
@cbodley

cbodley commented Sep 18, 2020

Copy link
Copy Markdown
Contributor Author

jenkins test api

@cbodley
cbodley requested a review from smanjara September 18, 2020 14:53
@cbodley
cbodley merged commit 4e680c9 into ceph:master Sep 25, 2020
@cbodley
cbodley deleted the wip-rgw-bucket-sync-checkpoint branch September 25, 2020 14:57
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