Actions
Bug #37328
closedrgw: master zone deletion without a zonegroup rm would break rgw rados init
% Done:
0%
Source:
Tags:
Backport:
luminous, mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
currently we validate the existance of master zone for all zonegroups in a period, which will trigger an impossible scenario when the master zone in a non-master zonegroup is deleted before removing it already, as the master_zone field would exist and point to a now non existant zone. Since this is a part of RGWRados init check, any subsequent operations cannot be done in the cluster.
A simple script to simulate this would be:
The following creates 2 zgs with a zone each
radosgw-admin realm create --rgw-realm=test --default radosgw-admin zonegroup create --rgw-zonegroup=zg1 --endpoints=http://localhost:8001 --master --default radosgw-admin zone create --rgw-zonegroup=zg1 --rgw-zone=z1 --endpoints=http://localhost:8001 --access-key=zaccess1 --secret=zsecret1 --master --default radosgw-admin user create --rgw-zone=z1 --rgw-zonegroup=zg1 --uid=sysuser --display-name=sysuser --access-key=zaccess1 --secret=zsecret1 radosgw -n client.rgw --rgw_frontends="civetweb port=8001" --rgw-zone=z1 --rgw-zonegroup=zg1 echo "sleeping to wait rgw to startup" && sleep 5 radosgw-admin period update --commit radosgw-admin zonegroup create --rgw-zonegroup=zg2 --endpoints=http://localhost:8002 radosgw-admin zone create --rgw-zone=z2 --rgw-zonegroup=zg2 --endpoints=http://localhost:8002 --access-key=zaccess1 --secret=zsecret1 --master radosgw-admin period update --commit
After the above setup, a simple
$ radosgw-admin zone delete --rgw-zone=z2 $ radosgw-admin period update --commit
will render any further rados activities useless as rados init_complete will not succeed from this point on.
Actions