From 88bd379ceac5f43d0862ff1270dc7524e69f4124 Mon Sep 17 00:00:00 2001 From: Jiri Macku Date: Wed, 8 Jan 2025 11:36:25 +0100 Subject: [PATCH] Add retry to cephadm install --- roles/cifmw_cephadm/defaults/main.yml | 2 ++ roles/cifmw_cephadm/tasks/install_cephadm.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/roles/cifmw_cephadm/defaults/main.yml b/roles/cifmw_cephadm/defaults/main.yml index 3eb487c13b..f1334fdec3 100644 --- a/roles/cifmw_cephadm/defaults/main.yml +++ b/roles/cifmw_cephadm/defaults/main.yml @@ -147,3 +147,5 @@ cifmw_cephadm_repository_override: false cifmw_cephadm_version: "squid" # bug in cephadm: if you skip "prepare host" it will fail cifmw_cephadm_prepare_host: false +cifmw_cephadm_wait_install_retries: 8 +cifmw_cephadm_wait_install_delay: 15 diff --git a/roles/cifmw_cephadm/tasks/install_cephadm.yml b/roles/cifmw_cephadm/tasks/install_cephadm.yml index 4c932f2823..d334a725ee 100644 --- a/roles/cifmw_cephadm/tasks/install_cephadm.yml +++ b/roles/cifmw_cephadm/tasks/install_cephadm.yml @@ -30,6 +30,10 @@ ansible.builtin.dnf: name: cephadm state: present + register: task_result + retries: "{{ cifmw_cephadm_wait_install_retries }}" + delay: "{{ cifmw_cephadm_wait_install_delay }}" + until: task_result is success - name: Stat cephadm file ansible.builtin.stat: