From 0acc0ce3ddb36f34c5b5ab1f92aa3800c288748b Mon Sep 17 00:00:00 2001 From: "Ritchie, Frank (fr801x)" Date: Fri, 23 Jul 2021 16:33:22 -0500 Subject: [PATCH] Fix placement target delete function You must specify the zone or zonegroup. Change-Id: Id2bb6d5576ba39fb3671f7426e48f174fcf0016b --- ceph-rgw/Chart.yaml | 2 +- .../templates/bin/_create-rgw-placement-targets.sh.tpl | 10 +++++----- releasenotes/notes/ceph-rgw.yaml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ceph-rgw/Chart.yaml b/ceph-rgw/Chart.yaml index 507a743da..caa070237 100644 --- a/ceph-rgw/Chart.yaml +++ b/ceph-rgw/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph RadosGW name: ceph-rgw -version: 0.1.14 +version: 0.1.15 home: https://github.com/ceph/ceph ... diff --git a/ceph-rgw/templates/bin/_create-rgw-placement-targets.sh.tpl b/ceph-rgw/templates/bin/_create-rgw-placement-targets.sh.tpl index 0fb7af807..546ce67b9 100644 --- a/ceph-rgw/templates/bin/_create-rgw-placement-targets.sh.tpl +++ b/ceph-rgw/templates/bin/_create-rgw-placement-targets.sh.tpl @@ -25,13 +25,13 @@ function create_rgw_placement_target () { function delete_rgw_placement_target () { echo "Deleting rgw placement target $1" - radosgw-admin zonegroup placement rm $1 + radosgw-admin zonegroup placement rm --rgw-zonegroup "$1" --placement-id "$2" } function add_rgw_zone_placement () { echo "Adding rgw zone placement for placement target $2 data pool $3" radosgw-admin zone placement add \ - --rgw-zone $1 \ + --rgw-zone "$1" \ --placement-id "$2" \ --data-pool "$3" \ --index-pool "$4" \ @@ -40,7 +40,7 @@ function add_rgw_zone_placement () { function rm_rgw_zone_placement () { echo "Removing rgw zone placement for placement target $1" - radosgw-admin zone placement rm $1 + radosgw-admin zone placement rm --rgw-zone "$1" --placement-id "$2" } {{- range $i, $placement_target := .Values.conf.rgw_placement_targets }} @@ -59,7 +59,7 @@ if [[ -z "$RGW_PLACEMENT_TARGET_EXISTS" ]]; then fi if [[ -n "$RGW_PLACEMENT_TARGET_EXISTS" ]] && [[ "true" == "$RGW_DELETE_PLACEMENT_TARGET" ]]; then - rm_rgw_zone_placement "$RGW_PLACEMENT_TARGET" - delete_rgw_placement_target "$RGW_PLACEMENT_TARGET" + rm_rgw_zone_placement "$RGW_ZONE" "$RGW_PLACEMENT_TARGET" + delete_rgw_placement_target "$RGW_ZONEGROUP" "$RGW_PLACEMENT_TARGET" fi {{- end }} diff --git a/releasenotes/notes/ceph-rgw.yaml b/releasenotes/notes/ceph-rgw.yaml index e8594329c..595b90a9f 100644 --- a/releasenotes/notes/ceph-rgw.yaml +++ b/releasenotes/notes/ceph-rgw.yaml @@ -15,4 +15,5 @@ ceph-rgw: - 0.1.12 Export crash dumps when Ceph daemons crash - 0.1.13 Add configmap hash for keystone rgw - 0.1.14 Disable crash dumps for rgw + - 0.1.15 Correct rgw placement target functions ...