[NEWTON-ONLY] Ignore Ceph healt warning states by default

The Ceph cluster health state can change from _OK to _WARN during upgrade
because MONs are upgraded one by one and the cluster tunables can't
satisfy both instances at the same time.

This submission changes the default value of IgnoreCephUpgradeWarnings
into true, which make the upgrade script to ignore non _ERR states, while
still checking for the node to be back into quorum, behaving similarily to
ceph-ansible.

Closes-Bug: #1709370
Change-Id: I96140e32d9436aaa85003037bcc789384378b364
This commit is contained in:
Giulio Fidente 2017-08-08 18:06:32 +02:00
parent 5b3c4dffbe
commit 3f1a33666a
2 changed files with 3 additions and 4 deletions

View File

@ -23,10 +23,9 @@ if [ ${CEPH_STATUS} = HEALTH_ERR ]; then
exit 1
fi
# Useful when upgrading with OSDs num < replica size
if [[ ${ignore_ceph_upgrade_warnings:-False} != [Tt]rue ]]; then
if [[ ${ignore_ceph_upgrade_warnings:-True} != [Tt]rue ]]; then
timeout 300 bash -c "while [ ${CEPH_STATUS} != HEALTH_OK ]; do
echo WARNING: Waiting for Ceph cluster status to go HEALTH_OK;
echo WARNING: Waiting for Ceph cluster health to be HEALTH_OK;
sleep 30;
CEPH_STATUS=$(ceph health | awk '{print $1}')
done"

View File

@ -20,7 +20,7 @@ parameters:
default: 'auto'
IgnoreCephUpgradeWarnings:
type: boolean
default: false
default: true
description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
KeepSaharaServicesOnUpgrade:
type: boolean