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: metadata sync info should be shown at master zone of slave zoneg… #12187

Merged
merged 1 commit into from Dec 2, 2016

Conversation

Jing-Scott
Copy link
Contributor

…roup

When executing 'radosgw-admin sync status', the metadata sync info should be shown on the srceen at master zone of slave zonegroup.

Signed-off-by: Jing Wenjun jingwenjun@cmss.chinamobile.com

@Jing-Scott
Copy link
Contributor Author

@cbodley Please help to have a look. Thanks! ^_^
I have encontered the problem when I created a user in the master zone of master zonegroup, the master zone of slave zonegroup didn't sync the created user actually for other reasons(eg. network). But executing radosgw-admin sync status, the metadata sync info shown "no sync (zone is master)". So the metadata sync info is needed for the master zone of secondary zonegroup.

@@ -1975,7 +1975,7 @@ static void sync_status(Formatter *formatter)

list<string> md_status;

if (zone.id == zonegroup.master_zone) {
if (zonegroup.is_master && zone.id == zonegroup.master_zone) {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks right. there's a store->is_meta_master() function that does the same thing - could you use that instead?

@cbodley
Copy link
Contributor

cbodley commented Nov 30, 2016

I created a tracker issue so we can get this fix backported to jewel. could you please add this line to your commit message?

Fixes: http://tracker.ceph.com/issues/18091

@Jing-Scott
Copy link
Contributor Author

@cbodley Thanks for your suggestion^_^. I have modified it and added the tracker issue line in my commit message.

@@ -1975,7 +1975,7 @@ static void sync_status(Formatter *formatter)

list<string> md_status;

if (zone.id == zonegroup.master_zone) {
if (store->is_meta_master() && zone.id == zonegroup.master_zone) {
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, i meant this could just be:

if (store->is_meta_master()) {

@cbodley
Copy link
Contributor

cbodley commented Nov 30, 2016

thanks! would you mind squashing the two into a single commit? (this makes it easier for the backport team)

…roup

When executing 'radosgw-admin sync status', the metadata sync info should be shown on the srceen at master zone of slave zonegroup.

Using the function store->is_meta_master() instead of 'zonegroup.is_master && zone.id == zonegroup.master_zone'

Fixes: http://tracker.ceph.com/issues/18091
Signed-off-by: Jing Wenjun <jingwenjun@cmss.chinamobile.com>
@Jing-Scott
Copy link
Contributor Author

@cbodley Okay. I have squashed the two. Thanks!

@cbodley cbodley merged commit fd02288 into ceph:master Dec 2, 2016
@Jing-Scott Jing-Scott deleted the dev/slave-master-sync-info branch January 11, 2017 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants