Project

General

Profile

Bug #37328

rgw: master zone deletion without a zonegroup rm would break rgw rados init

Added by Abhishek Lekshmanan 3 months ago. Updated 23 days ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Start date:
11/19/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous, mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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.


Related issues

Copied to Ceph - Backport #37465: mimic: rgw: master zone deletion without a zonegroup rm would break rgw rados init Resolved
Copied to Ceph - Backport #37466: luminous: rgw: master zone deletion without a zonegroup rm would break rgw rados init Resolved

History

#1 Updated by Abhishek Lekshmanan 3 months ago

  • Description updated (diff)
  • Backport set to luminous, mimic

#2 Updated by Abhishek Lekshmanan 3 months ago

  • Status changed from New to In Progress
  • Assignee set to Abhishek Lekshmanan

#3 Updated by Abhishek Lekshmanan 3 months ago

  • Status changed from In Progress to Need Test

#4 Updated by Abhishek Lekshmanan 3 months ago

  • Status changed from Need Test to Pending Backport

#5 Updated by Abhishek Lekshmanan 3 months ago

  • Copied to Backport #37465: mimic: rgw: master zone deletion without a zonegroup rm would break rgw rados init added

#6 Updated by Abhishek Lekshmanan 3 months ago

  • Copied to Backport #37466: luminous: rgw: master zone deletion without a zonegroup rm would break rgw rados init added

#7 Updated by Nathan Cutler 23 days ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF