Project

General

Profile

Bug #15251

radosgw-admin: creating multiple zonegroups as master in the same realm is allowed

Added by Abhishek Lekshmanan about 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
High
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Currently radosgw-admin allows creation of multiple zonegroups and allows switching of --master flag for each of them, this of course results in errors later, but it is not prevented at creation time. for eg:

$ radosgw-admin zonegroup create --rgw-zonegroup=us --endpoints=http://rgw1:80 --master
$ radosgw-admin zonegroup create --rgw-zonegroup=us2 --endpoints=http://rgw2:80 --master

... create zones etc.

$ radosgw-admin period update --commit
failed to update period: (22) Invalid argument2016-03-23 17:08:27.539682 7ffaa67709c0  0 ERROR: updating period map: (22) Invalid argument

period update failed: (22) Invalid argument

this will error out as the we iterate through all the zones in the map and zonegroupmap already would have commited its master-zonegroup as the first one, and we try to update the second one. Maybe we should check this at the creation time?

History

#1 Updated by Yehuda Sadeh about 8 years ago

  • Assignee set to Orit Wasserman
  • Priority changed from Normal to High

#2 Updated by Orit Wasserman about 8 years ago

Zone can be created as standalone and added to zonegroup later, we can validate there is no other master only in the zonegroup add command.

The checking of zonegroups requires reading all the zonegroups in the realm and going all over them to look for another master, this as performance cost. As we already do it in "period update" command I don't see a reason to do it twice.

We can improve the error messaging in the "period update" command and give more details about what is wrong with the new confguration

#3 Updated by Abhishek Lekshmanan almost 8 years ago

Orit Wasserman wrote:

Zone can be created as standalone and added to zonegroup later, we can validate there is no other master only in the zonegroup add command.

The checking of zonegroups requires reading all the zonegroups in the realm and going all over them to look for another master, this as performance cost. As we already do it in "period update" command I don't see a reason to do it twice.

We can improve the error messaging in the "period update" command and give more details about what is wrong with the new confguration

Yes, sure, makes sense.

#4 Updated by Matt Benjamin almost 8 years ago

  • Status changed from New to In Progress

#6 Updated by Abhishek Lekshmanan almost 8 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF