Bug #15901
closed'radosgw-admin zone modify' clears master_zone if no --master is given
0%
Description
Reported by smanjara@redhat.com
Expected: 'zone modify --rgw-zone us-1' should not change zonegroup master_zone
Result: 'zone modify --rgw-zone us-1' changes zonegroup master_zone from us-1 to us-2
Steps to Reproduce:
On master zone:
$ radosgw-admin realm create --rgw-realm=earth --default
$ radosgw-admin zonegroup create --rgw-zonegroup=us --endpoints=http://rgw1:8080 --master --default
$ radosgw-admin zone create --rgw-zonegroup=us --rgw-zone=us-1 --access-key=access --secret=secret --endpoints=http://rgw1:8080 --default --master
$ radosgw-admin period update --commit
$ radosgw-admin user create --uid=zone-user --display-name="Zone User" --access-key=access --secret=secret --system
On secondary zone:
$ radosgw-admin realm pull --url=http://rgw1:8080 --access-key=access --secret=secret --default
$ radosgw-admin zonegroup default --rgw-zonegroup=us
$ radosgw-admin zone create --rgw-zonegroup=us --rgw-zone=us-2 --access-key=access --secret=secret --endpoints=http://rgw2:8080 --default
$ radosgw-admin period update --commit
On master zone:
$ radosgw-admin zonegroup get
{
"id": "d41b790f-9631-433f-92c0-5c7c1da75139",
"name": "us",
"api_name": "us",
"is_master": "true",
"endpoints": [
"http:\/\/rgw1:8000"
],
"hostnames": [],
"hostnames_s3website": [],
"master_zone": "6958c568-864e-402a-bf03-4897f07b102c", <-- master_zone: us-1
"zones": [
{
"id": "059866cf-01d6-48a0-9d33-29d611d05bd2",
"name": "us-2",
"endpoints": [
"http:\/\/rgw2:8001"
],
"log_meta": "false",
"log_data": "true",
"bucket_index_max_shards": 0,
"read_only": "false"
},
{
"id": "6958c568-864e-402a-bf03-4897f07b102c",
"name": "us-1",
"endpoints": [
"http:\/\/rgw1:8000"
],
"log_meta": "true",
"log_data": "true",
"bucket_index_max_shards": 0,
"read_only": "false"
}
],
"placement_targets": [
{
"name": "default-placement",
"tags": []
}
],
"default_placement": "default-placement",
"realm_id": "4334adc0-3467-49ca-a170-cca154302eda"
}
$ radosgw-admin zone modify --rgw-zone=us-1
$ radosgw-admin zonegroup get
{
"id": "d41b790f-9631-433f-92c0-5c7c1da75139",
"name": "us",
"api_name": "us",
"is_master": "true",
"endpoints": [
"http:\/\/rgw2:8001"
],
"hostnames": [],
"hostnames_s3website": [],
"master_zone": "059866cf-01d6-48a0-9d33-29d611d05bd2", <-- master_zone: us-2
"zones": [
{
"id": "059866cf-01d6-48a0-9d33-29d611d05bd2",
"name": "us-2",
"endpoints": [
"http:\/\/rgw2:8001"
],
"log_meta": "true",
"log_data": "true",
"bucket_index_max_shards": 0,
"read_only": "false"
},
{
"id": "6958c568-864e-402a-bf03-4897f07b102c",
"name": "us-1",
"endpoints": [
"http:\/\/rgw1:8000"
],
"log_meta": "false",
"log_data": "true",
"bucket_index_max_shards": 0,
"read_only": "false"
}
],
"placement_targets": [
{
"name": "default-placement",
"tags": []
}
],
"default_placement": "default-placement",
"realm_id": "4334adc0-3467-49ca-a170-cca154302eda"
}
Updated by Casey Bodley almost 8 years ago
- Backport set to jewel
Updated by Nathan Cutler almost 8 years ago
- Status changed from New to Fix Under Review
Updated by Loïc Dachary almost 8 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Loïc Dachary almost 8 years ago
- Copied to Backport #16086: jewel: 'radosgw-admin zone modify' clears master_zone if no --master is given added
Updated by Loïc Dachary almost 8 years ago
- Status changed from Pending Backport to Resolved