ci: deploy rook with mon_warn_on_pool_no_redundancy in ceph.conf

In test environments the default pool size is set to 1, so there is no
redundancy. This causes recent Ceph versions to complain with
HEALTH_WARN as POOL_NO_REDUNDANCY get set.

By disabling the mon_warn_on_pool_no_redundancy option in ceph.conf, the
warning is not reported and the cluster is marked HEALTHY.

See-also: rook/rook#5925
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-07-29 13:22:41 +02:00 committed by mergify[bot]
parent fb60f66178
commit ff94ba282c

View File

@ -26,7 +26,15 @@ function deploy_rook() {
kubectl create -f "${TEMP_DIR}/cluster-test.yaml" kubectl create -f "${TEMP_DIR}/cluster-test.yaml"
rm -rf "${TEMP_DIR}" rm -rf "${TEMP_DIR}"
else else
kubectl create -f "${ROOK_URL}/cluster-test.yaml" # add "mon_warn_on_pool_no_redundancy = false" to ceph.conf if missing
# see https://github.com/rook/rook/pull/5925 for upstream status
TEMP_DIR="$(mktemp -d)"
curl -o "${TEMP_DIR}"/cluster-test.yaml "${ROOK_URL}/cluster-test.yaml"
if ! grep -q mon_warn_on_pool_no_redundancy "${TEMP_DIR}"/cluster-test.yaml; then
sed -i '/osd_pool_default_size =/a \ mon_warn_on_pool_no_redundancy = false' "${TEMP_DIR}"/cluster-test.yaml
fi
kubectl create -f "${TEMP_DIR}/cluster-test.yaml"
rm -rf "${TEMP_DIR}"
fi fi
kubectl create -f "${ROOK_URL}/toolbox.yaml" kubectl create -f "${ROOK_URL}/toolbox.yaml"