Project

General

Profile

Bug #37328

Updated by Abhishek Lekshmanan over 5 years ago

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 
 <pre> 
 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 

 </pre> 


 After the above setup, a simple  
 <pre> 
 $ radosgw-admin zone delete --rgw-zone=z2  
 $ radosgw-admin period update --commit  
 </pre> 

 will render any further rados activities useless as rados init_complete will not succeed from this point on.

Back