diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index f7835edd98..4f48d2bc71 100644 --- a/ceph-client/Chart.yaml +++ b/ceph-client/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph Client name: ceph-client -version: 0.1.45 +version: 0.1.46 home: https://github.com/ceph/ceph-client ... diff --git a/ceph-client/templates/bin/pool/_init.sh.tpl b/ceph-client/templates/bin/pool/_init.sh.tpl index 3babe9297e..07ac4726e2 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -249,7 +249,9 @@ function create_pool () { ceph --cluster "${CLUSTER}" osd pool application enable "${POOL_NAME}" "${POOL_APPLICATION}" fi - pool_values=$(ceph --cluster "${CLUSTER}" osd pool get "${POOL_NAME}" all -f json) + # 'tr' and 'awk' are needed here to strip off text that is echoed before the JSON string. + # In some cases, errors/warnings are written to stdout and the JSON doesn't parse correctly. + pool_values=$(ceph --cluster "${CLUSTER}" osd pool get "${POOL_NAME}" all -f json | tr -d '\n' | awk -F{ '{print "{" $2}') if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -ge 14 ]]; then if [[ "${ENABLE_AUTOSCALER}" == "true" ]]; then diff --git a/releasenotes/notes/ceph-client.yaml b/releasenotes/notes/ceph-client.yaml index 4a2c885fe5..26da7f164d 100644 --- a/releasenotes/notes/ceph-client.yaml +++ b/releasenotes/notes/ceph-client.yaml @@ -46,4 +46,5 @@ ceph-client: - 0 1.43 Document the use of mon_allow_pool_size_one - 0.1.44 Allow pg_num_min to be overridden per pool - 0.1.45 Update Ceph to 17.2.6 + - 0.1.46 Strip any errors preceding pool properties JSON ...