Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manual creation of target placements #6645

Open
ubi2go opened this issue Jun 6, 2024 · 0 comments
Open

manual creation of target placements #6645

ubi2go opened this issue Jun 6, 2024 · 0 comments

Comments

@ubi2go
Copy link
Contributor

ubi2go commented Jun 6, 2024

target placments and storage class in radosgw

  • AZ-A - replication 3 (AZ A only)
  • AZ-B - replication 3 (AZ B only)
  • AZ-AB-3 - replication 4 (across AZs)
  • AZ-AB-4 - replication 3 (across AZs)

get zone and zonegroup name

bash-4.4$ ceph config dump | grep "rgw_zone|rgw_zonegroup"
client.rgw.ceph.objectstore.st1.eu.de.2.a advanced rgw_zone ceph-objectstore-st1-eu-de-2 *
client.rgw.ceph.objectstore.st1.eu.de.2.a advanced rgw_zonegroup ceph-objectstore-st1-eu-de-2 *
bash-4.4$

verification

radosgw-admin zonegroup list

backup

radosgw-admin zonegroup get --rgw-zonegroup=ceph-objectstore-st1-eu-de-2 > zonegroup.json

radosgw-admin zone get --rgw-zone=ceph-objectstore-st1-eu-de-2 > zone.json

add zonegroup target placement

AZ-A

radosgw-admin zonegroup placement add --placement-id az-a --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2

AZ-B

radosgw-admin zonegroup placement add --placement-id az-b --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2

AZ-AB-3

radosgw-admin zonegroup placement add --placement-id az-ab-3 --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2

AZ-AB-4

radosgw-admin zonegroup placement add --placement-id az-ab-4 --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2

add zone target placement

AZ-A

radosgw-admin zone placement add --placement-id az-a --data-pool az-a.rgw.buckets.data --index-pool az-a.rgw.buckets.index --data-extra-pool az-a.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2

AZ-B

radosgw-admin zone placement add --placement-id az-b --data-pool az-b.rgw.buckets.data --index-pool az-b.rgw.buckets.index --data-extra-pool az-b.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2

AZ-AB-3

radosgw-admin zone placement add --placement-id az-ab-3 --data-pool az-ab-3.rgw.buckets.data --index-pool az-ab-3.rgw.buckets.index --data-extra-pool az-ab-3.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2

AZ-AB-4

radosgw-admin zone placement add --placement-id az-ab-4 --data-pool az-ab-4.rgw.buckets.data --index-pool az-ab-4.rgw.buckets.index --data-extra-pool az-ab-4.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2

OUTPUT:

bash-4.4$ radosgw-admin zonegroup placement add --placement-id az-a --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2
[
{
"key": "az-a",
"val": {
"name": "az-a",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "default-placement",
"val": {
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
}
]
bash-4.4$ radosgw-admin zonegroup placement add --placement-id az-b --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2
[
{
"key": "az-a",
"val": {
"name": "az-a",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-b",
"val": {
"name": "az-b",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "default-placement",
"val": {
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
}
]
bash-4.4$ radosgw-admin zonegroup placement add --placement-id az-ab-3 --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2
[
{
"key": "az-a",
"val": {
"name": "az-a",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-ab-3",
"val": {
"name": "az-ab-3",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-b",
"val": {
"name": "az-b",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "default-placement",
"val": {
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
}
]
bash-4.4$ radosgw-admin zonegroup placement add --placement-id az-ab-4 --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-
failed to init zonegroup: (2) No such file or directory
bash-4.4$ radosgw-admin zonegroup placement add --placement-id az-ab-4 --rgw-realm=ceph-objectstore-st1-eu-de-2 --rgw-zonegroup=ceph-objectstore-st1-eu-de-2
[
{
"key": "az-a",
"val": {
"name": "az-a",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-ab-3",
"val": {
"name": "az-ab-3",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-ab-4",
"val": {
"name": "az-ab-4",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "az-b",
"val": {
"name": "az-b",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
},
{
"key": "default-placement",
"val": {
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
}
]
bash-4.4$

OUTPUT:

bash-4.4$ radosgw-admin zone placement add --placement-id az-a --data-pool az-a.rgw.buckets.data --index-pool az-a.rgw.buckets.index --data-extra-pool az-a.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2
{
"id": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"name": "ceph-objectstore-st1-eu-de-2",
"domain_root": "ceph-objectstore-st1-eu-de-2.rgw.meta:root",
"control_pool": "ceph-objectstore-st1-eu-de-2.rgw.control",
"gc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:gc",
"lc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:lc",
"log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log",
"intent_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:intent",
"usage_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:usage",
"roles_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:roles",
"reshard_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:reshard",
"user_keys_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.keys",
"user_email_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.email",
"user_swift_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.swift",
"user_uid_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.uid",
"otp_pool": "ceph-objectstore-st1-eu-de-2.rgw.otp",
"system_key": {
"access_key": "",
"secret_key": ""
},
"placement_pools": [
{
"key": "az-a",
"val": {
"index_pool": "az-a.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-a.rgw.buckets.data"
}
},
"data_extra_pool": "az-a.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "default-placement",
"val": {
"index_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.data"
}
},
"data_extra_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
}
],
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"notif_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:notif"
}
bash-4.4$ radosgw-admin zone placement add --placement-id az-b --data-pool az-b.rgw.buckets.data --index-pool az-b.rgw.buckets.index --data-extra-pool az-b.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2
{
"id": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"name": "ceph-objectstore-st1-eu-de-2",
"domain_root": "ceph-objectstore-st1-eu-de-2.rgw.meta:root",
"control_pool": "ceph-objectstore-st1-eu-de-2.rgw.control",
"gc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:gc",
"lc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:lc",
"log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log",
"intent_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:intent",
"usage_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:usage",
"roles_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:roles",
"reshard_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:reshard",
"user_keys_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.keys",
"user_email_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.email",
"user_swift_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.swift",
"user_uid_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.uid",
"otp_pool": "ceph-objectstore-st1-eu-de-2.rgw.otp",
"system_key": {
"access_key": "",
"secret_key": ""
},
"placement_pools": [
{
"key": "az-a",
"val": {
"index_pool": "az-a.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-a.rgw.buckets.data"
}
},
"data_extra_pool": "az-a.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-b",
"val": {
"index_pool": "az-b.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-b.rgw.buckets.data"
}
},
"data_extra_pool": "az-b.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "default-placement",
"val": {
"index_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.data"
}
},
"data_extra_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
}
],
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"notif_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:notif"
}
bash-4.4$ radosgw-admin zone placement add --placement-id az-ab-3 --data-pool az-ab-3.rgw.buckets.data --index-pool az-ab-3.rgw.buckets.index --data-extra-pool az-ab-3.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2
{
"id": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"name": "ceph-objectstore-st1-eu-de-2",
"domain_root": "ceph-objectstore-st1-eu-de-2.rgw.meta:root",
"control_pool": "ceph-objectstore-st1-eu-de-2.rgw.control",
"gc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:gc",
"lc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:lc",
"log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log",
"intent_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:intent",
"usage_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:usage",
"roles_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:roles",
"reshard_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:reshard",
"user_keys_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.keys",
"user_email_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.email",
"user_swift_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.swift",
"user_uid_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.uid",
"otp_pool": "ceph-objectstore-st1-eu-de-2.rgw.otp",
"system_key": {
"access_key": "",
"secret_key": ""
},
"placement_pools": [
{
"key": "az-a",
"val": {
"index_pool": "az-a.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-a.rgw.buckets.data"
}
},
"data_extra_pool": "az-a.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-ab-3",
"val": {
"index_pool": "az-ab-3.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-ab-3.rgw.buckets.data"
}
},
"data_extra_pool": "az-ab-3.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-b",
"val": {
"index_pool": "az-b.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-b.rgw.buckets.data"
}
},
"data_extra_pool": "az-b.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "default-placement",
"val": {
"index_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.data"
}
},
"data_extra_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
}
],
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"notif_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:notif"
}
bash-4.4$ radosgw-admin zone placement add --placement-id az-ab-4 --data-pool az-ab-4.rgw.buckets.data --index-pool az-ab-4.rgw.buckets.index --data-extra-pool az-ab-4.rgw.buckets.non-ec --rgw-zone=ceph-objectstore-st1-eu-de-2
{
"id": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"name": "ceph-objectstore-st1-eu-de-2",
"domain_root": "ceph-objectstore-st1-eu-de-2.rgw.meta:root",
"control_pool": "ceph-objectstore-st1-eu-de-2.rgw.control",
"gc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:gc",
"lc_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:lc",
"log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log",
"intent_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:intent",
"usage_log_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:usage",
"roles_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:roles",
"reshard_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:reshard",
"user_keys_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.keys",
"user_email_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.email",
"user_swift_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.swift",
"user_uid_pool": "ceph-objectstore-st1-eu-de-2.rgw.meta:users.uid",
"otp_pool": "ceph-objectstore-st1-eu-de-2.rgw.otp",
"system_key": {
"access_key": "",
"secret_key": ""
},
"placement_pools": [
{
"key": "az-a",
"val": {
"index_pool": "az-a.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-a.rgw.buckets.data"
}
},
"data_extra_pool": "az-a.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-ab-3",
"val": {
"index_pool": "az-ab-3.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-ab-3.rgw.buckets.data"
}
},
"data_extra_pool": "az-ab-3.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-ab-4",
"val": {
"index_pool": "az-ab-4.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-ab-4.rgw.buckets.data"
}
},
"data_extra_pool": "az-ab-4.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "az-b",
"val": {
"index_pool": "az-b.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "az-b.rgw.buckets.data"
}
},
"data_extra_pool": "az-b.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
},
{
"key": "default-placement",
"val": {
"index_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.index",
"storage_classes": {
"STANDARD": {
"data_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.data"
}
},
"data_extra_pool": "ceph-objectstore-st1-eu-de-2.rgw.buckets.non-ec",
"index_type": 0,
"inline_data": true
}
}
],
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"notif_pool": "ceph-objectstore-st1-eu-de-2.rgw.log:notif"
}
bash-4.4$

bash-4.4$ radosgw-admin period update --commit
{
"id": "55b21ba1-c82a-4481-bf2c-e653d6b40ebb",
"epoch": 2,
"predecessor_uuid": "05a2df78-65e5-48b7-8b1c-5ed99c691853",
"sync_status": [],
"period_map": {
"id": "55b21ba1-c82a-4481-bf2c-e653d6b40ebb",
"zonegroups": [
{
"id": "610c9e3d-19e7-40b0-9f88-03319c4bc65a",
"name": "ceph-objectstore-st1-eu-de-2",
"api_name": "ceph-objectstore-st1-eu-de-2",
"is_master": true,
"endpoints": [
"https://rook-ceph-rgw-ceph-objectstore-st1-eu-de-2.rook-ceph.svc:443"
],
"hostnames": [],
"hostnames_s3website": [],
"master_zone": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"zones": [
{
"id": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"name": "ceph-objectstore-st1-eu-de-2",
"endpoints": [
"https://rook-ceph-rgw-ceph-objectstore-st1-eu-de-2.rook-ceph.svc:443"
],
"log_meta": false,
"log_data": false,
"bucket_index_max_shards": 11,
"read_only": false,
"tier_type": "",
"sync_from_all": true,
"sync_from": [],
"redirect_zone": "",
"supported_features": [
"compress-encrypted",
"resharding"
]
}
],
"placement_targets": [
{
"name": "az-a",
"tags": [],
"storage_classes": [
"STANDARD"
]
},
{
"name": "az-ab-3",
"tags": [],
"storage_classes": [
"STANDARD"
]
},
{
"name": "az-ab-4",
"tags": [],
"storage_classes": [
"STANDARD"
]
},
{
"name": "az-b",
"tags": [],
"storage_classes": [
"STANDARD"
]
},
{
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
],
"default_placement": "default-placement",
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"sync_policy": {
"groups": []
},
"enabled_features": [
"resharding"
]
}
],
"short_zone_ids": [
{
"key": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"val": 2203786372
}
]
},
"master_zonegroup": "610c9e3d-19e7-40b0-9f88-03319c4bc65a",
"master_zone": "f539c2c0-e1ed-4c42-9294-41742352eeae",
"period_config": {
"bucket_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_ratelimit": {
"max_read_ops": 0,
"max_write_ops": 0,
"max_read_bytes": 0,
"max_write_bytes": 0,
"enabled": false
},
"bucket_ratelimit": {
"max_read_ops": 0,
"max_write_ops": 0,
"max_read_bytes": 0,
"max_write_bytes": 0,
"enabled": false
},
"anonymous_ratelimit": {
"max_read_ops": 0,
"max_write_ops": 0,
"max_read_bytes": 0,
"max_write_bytes": 0,
"enabled": false
}
},
"realm_id": "29e28253-be54-4581-90dd-206020d2fcdd",
"realm_name": "ceph-objectstore-st1-eu-de-2",
"realm_epoch": 2
}
bash-4.4$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant