Ceph - How to add hostnames in RGW zonegroup?
Environment
- Red Hat Ceph Storage 2.3
- Red Hat Ceph Storage 2.4
- Red Hat Ceph Storage 2.5
- Red Hat Ceph Storage 3
- Red Hat Ceph Storage 4
- Red Hat Ceph Storage 5
Issue
- How to add
hostnamesin RGWzonegroup?
Resolution
- Get the zonegroup
# radosgw-admin zonegroup get --rgw-zonegroup=<zonegroup-name> > zonegroup.json
- Make a backup of the file so you can revert if needed:
# cp zonegroup.json zonegroup.bak.json
- Update the zonegroup.json file with new
hostnames
"hostnames": ["hostname-1", "hostname-2","hostname-N"],
- Set the zonegroup back in the RGW:
# radosgw-admin zonegroup set --rgw-zonegroup=<zonegroup-name> --infile=zonegroup.json
- Update the period
# radosgw-admin period update --commit
Diagnostic Steps
- Updated zonegroup with hostnames:
# radosgw-admin zonegroup get --rgw-zonegroup=default
{
"id": "26406af2-c69a-4659-99dc-84b5c34b58b1",
"name": "default",
"api_name": "",
"is_master": "true",
"endpoints": [],
"hostnames": [
"hostname-1",
"hostname-2"
],
"hostnames_s3website": [],
"master_zone": "e27b7f16-10b2-48c9-8f84-feb35abbb0fd",
"zones": [
{
"id": "e27b7f16-123b-48c9-8f84-feb35abbb0fd",
"name": "default",
"endpoints": [],
"log_meta": "false",
"log_data": "false",
"bucket_index_max_shards": 0,
"read_only": "false"
}
],
"placement_targets": [
{
"name": "default-placement",
"tags": []
}
],
"default_placement": "default-placement",
"realm_id": "516e9967-b978-42e3-be04-21ae1c72a622"
}
SBR
Product(s)
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.