Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: set sync_from_all as true when no value is seen #18926

Merged
merged 1 commit into from Nov 16, 2017

Conversation

Projects
None yet
3 participants
@theanalyst
Copy link
Member

commented Nov 14, 2017

In order to support jewel-luminous multisite scenarios where when a
jewel cluster is the master, the sync-from-all json field wouldn't be
set leading to the secondary not syncing data as this value can't be
overriden to true, so defaulting the value of sync_from_all to true when
we don't encounter it in the json

Fixes: http://tracker.ceph.com/issues/22062
Signed-off-by: Abhishek Lekshmanan abhishek@suse.com

@@ -987,7 +987,9 @@ void RGWZone::decode_json(JSONObj *obj)
JSONDecoder::decode_json("bucket_index_max_shards", bucket_index_max_shards, obj);
JSONDecoder::decode_json("read_only", read_only, obj);
JSONDecoder::decode_json("tier_type", tier_type, obj);
JSONDecoder::decode_json("sync_from_all", sync_from_all, obj);
if (false == JSONDecoder::decode_json("sync_from_all", sync_from_all, obj)){

This comment has been minimized.

Copy link
@cbodley

cbodley Nov 14, 2017

Contributor

JSONDecoder has another overload that takes a default_val that looks perfect for this. see https://github.com/ceph/ceph/blob/master/src/common/ceph_json.h#L125

JSONDecoder::decode_json("sync_from_all", sync_from_all, true, obj);

(if that doesn't compile, we might need to change the T& default_val arg to const T& default_val in that overload)

This comment has been minimized.

Copy link
@theanalyst

theanalyst Nov 14, 2017

Author Member

updated

rgw: set sync_from_all as true when no value is seen
In order to support jewel-luminous multisite scenarios where when a
jewel cluster is the master, the sync-from-all json field wouldn't be
set leading to the secondary not syncing data as this value can't be
overriden to true, so defaulting the value of sync_from_all to true when
we don't encounter it in the json

Fixes: http://tracker.ceph.com/issues/22062
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>

@theanalyst theanalyst force-pushed the theanalyst:wip-mp-jewel-fix branch from 2e61fe7 to e0116fa Nov 14, 2017

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2017

@yuriw yuriw merged commit 00c95a0 into ceph:master Nov 16, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.