From ac2cb9ac2cceafcb54721b6fa91da1535c263c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 3 Oct 2016 11:24:59 +0200 Subject: [PATCH] upgrade: add custom timeout options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces the ability to configure delays and retries for cluster health checks, for both monitors and OSDs. Signed-off-by: Sébastien Han --- infrastructure-playbooks/rolling_update.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 6c112d060..2341a61f7 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -59,6 +59,8 @@ vars: upgrade_ceph_packages: True mon_group_name: mons + health_mon_check_retries: 5 + health_mon_check_delay: 10 roles: - ceph-common @@ -95,8 +97,8 @@ ceph -s --cluster {{ cluster }} | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} register: result until: result.rc == 0 - retries: 5 - delay: 10 + retries: "{{ health_mon_check_retries }}" + delay: "{{ health_mon_check_delay }}" delegate_to: "{{ mon_host }}" @@ -106,6 +108,8 @@ vars: upgrade_ceph_packages: True osd_group_name: osds + health_osd_check_retries: 10 + health_osd_check_delay: 10 pre_tasks: - name: set osd flags @@ -151,8 +155,8 @@ test "$(ceph pg stat --cluster {{ cluster }} | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(ceph pg stat --cluster {{ cluster }} | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health --cluster {{ cluster }} | egrep -sq "HEALTH_OK|HEALTH_WARN" register: result until: result.rc == 0 - retries: 10 - delay: 10 + retries: "{{ health_osd_check_retries }}" + delay: "{{ health_osd_check_delay }}" delegate_to: "{{ groups.mons[0] }}" - name: unset osd flags