[ceph] Allow gate scripts to use 1x replication in Ceph

The Pacific release of Ceph disabled 1x replication by default, and
some of the gate scripts are not updated to allow this explicitly.
Some gate jobs fail in some configurations as a result, so this
change adds 'mon_allow_pool_size_one = true' to those Ceph gate
scripts that don't already have it, along with
--yes-i-really-mean-it added to commands that set pool size.

Change-Id: I5fb08d3bb714f1b67294bb01e17e8a5c1ddbb73a
This commit is contained in:
Stephen Taylor 2023-03-14 10:56:47 -06:00
parent 42752cca63
commit f80049faa1
8 changed files with 13 additions and 2 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph Client
name: ceph-client
version: 0.1.40
version: 0.1.41
home: https://github.com/ceph/ceph-client
...

View File

@ -218,9 +218,14 @@ function set_pool_property() {
PROPERTY_NAME=$2
CURRENT_PROPERTY_VALUE=$3
TARGET_PROPERTY_VALUE=$4
REALLY_MEAN_IT=""
if [[ "${PROPERTY_NAME}" == "size" ]]; then
REALLY_MEAN_IT="--yes-i-really-mean-it"
fi
if [[ "${CURRENT_PROPERTY_VALUE}" != "${TARGET_PROPERTY_VALUE}" ]]; then
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" "${PROPERTY_NAME}" "${TARGET_PROPERTY_VALUE}"
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" "${PROPERTY_NAME}" "${TARGET_PROPERTY_VALUE}" ${REALLY_MEAN_IT}
fi
echo "${TARGET_PROPERTY_VALUE}"

View File

@ -41,4 +41,5 @@ ceph-client:
- 0.1.38 Make use of noautoscale with Pacific
- 0.1.39 Correct check for too many OSDs in the pool job
- 0.1.40 Fix OSD count checks in the ceph-rbd-pool job
- 0.1.41 Allow gate scripts to use 1x replication in Ceph
...

View File

@ -64,6 +64,7 @@ conf:
ceph:
global:
fsid: ${CEPH_FS_ID}
mon_allow_pool_size_one: true
rgw_ks:
enabled: true
pool:

View File

@ -73,6 +73,7 @@ conf:
global:
fsid: ${CEPH_FS_ID}
mon_addr: :6789
mon_allow_pool_size_one: true
osd_pool_default_size: 1
osd:
osd_crush_chooseleaf_type: 0

View File

@ -73,6 +73,7 @@ conf:
global:
fsid: ${CEPH_FS_ID}
mon_addr: :6789
mon_allow_pool_size_one: true
osd_pool_default_size: 1
osd:
osd_crush_chooseleaf_type: 0

View File

@ -82,6 +82,7 @@ conf:
ceph:
global:
fsid: ${CEPH_FS_ID}
mon_allow_pool_size_one: true
mon:
mon_clock_drift_allowed: 2.0
rgw_ks:

View File

@ -127,6 +127,7 @@ conf:
ceph:
global:
fsid: ${TENANT_CEPH_FS_ID}
mon_allow_pool_size_one: true
rgw_ks:
enabled: true
pool: