Skip to content

rgw/multisite: allow bucket sync disable/enable - #41404

Merged
cbodley merged 4 commits into
ceph:wip-rgw-multisite-reshardfrom
yuvalif:wip-yuval-disable-bucket-sync2
Jul 27, 2021
Merged

cbodley merged 4 commits into
ceph:wip-rgw-multisite-reshardfrom
yuvalif:wip-yuval-disable-bucket-sync2

Conversation

@yuvalif

@yuvalif yuvalif commented May 19, 2021

Copy link
Copy Markdown
Contributor

Signed-off-by: Yuval Lifshitz [email protected]


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

Comment thread src/rgw/rgw_data_sync.cc Resolved
Comment thread src/rgw/rgw_data_sync.cc Resolved
Comment thread src/rgw/rgw_data_sync.cc Resolved
Comment thread src/rgw/rgw_data_sync.h Resolved
Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as discussed in irc, i think it's safe to do away with the retry loop here in InitBucketShardStatusCR, and just do this initial write with exclusive=false so it never fails with EEXIST or ECANCELED

there may be racing writers, but Init should always win these races - this is accomplished by objv.generate_write_new_ver(), which will change the 'tag' in cls_version and cause other writers to fail on cls_version_check()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok. will do that in a separate commit, as this should not change functionality here

Comment thread src/rgw/rgw_data_sync.cc Resolved
@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from eaf3fd8 to 92531f2 Compare May 27, 2021 15:56
@yuvalif

yuvalif commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Comment thread src/rgw/rgw_data_sync.cc Resolved
@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from 92531f2 to a9898d7 Compare June 9, 2021 14:20
@github-actions

github-actions Bot commented Jun 9, 2021

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from a9898d7 to b3cc52e Compare June 9, 2021 15:09
@yuvalif

yuvalif commented Jun 9, 2021

Copy link
Copy Markdown
Contributor Author

test_bucket_sync_disable() and test_bucket_sync_disable_enable() - passing
test_bucket_sync_enable_right_after_disable() - failing

@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from b3cc52e to 19ea5b3 Compare June 14, 2021 14:06
@yuvalif

yuvalif commented Jun 14, 2021

Copy link
Copy Markdown
Contributor Author

all disable/enable tests are now passing

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if we get an error like ENOENT trying to delete a shard, we should still try to delete the rest

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ENOENT is converted to success in the called CR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there may be other error codes. i think we should drop the comment and || status < 0 part

Comment thread src/rgw/rgw_data_sync.cc Resolved
Comment thread src/rgw/rgw_data_sync.cc Resolved
yuvalif added 3 commits June 15, 2021 20:22
when writign the sync status object

Signed-off-by: Yuval Lifshitz <[email protected]>
@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from 19ea5b3 to 52f3113 Compare June 16, 2021 09:34
Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'm not sure this is a good reason to crash, can we take out the assert?

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there may be other error codes. i think we should drop the comment and || status < 0 part

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

too many tabs here and elsewhere. we treat tabs as 8 spaces, and your editor should be picking up these modelines:

// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp

for vim, i enabled this with set modeline in my .vimrc

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

too many tabs

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not sure this is helpful since the coroutine logging will already show CheckAllBucketShardStatusIsIncremental?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok. will remove

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we just set bucket_status.state = BucketSyncState::Stopped; in the block above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

right. i should move this block before the one that update the bucket wide state object

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tabs

Comment thread src/rgw/rgw_data_sync.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tabs

and pass correct generation and num shards when deleting
per shard status objects when disabling during incremental sync

Signed-off-by: Yuval Lifshitz <[email protected]>
@yuvalif
yuvalif force-pushed the wip-yuval-disable-bucket-sync2 branch from 52f3113 to 01a9d9d Compare June 16, 2021 15:08
@cbodley
cbodley merged commit 01a9d9d into ceph:wip-rgw-multisite-reshard Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants