From 77171216fbdc2a6c05260b866d14c4492c198abc Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 26 Jul 2021 11:19:36 +0200 Subject: [PATCH] update: check the ceph release Check early which Ceph release is going to be deployed and fail if it doesn't correspond to the ceph-ansible version being used. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1978643 Signed-off-by: Guillaume Abrioux (cherry picked from commit eec38784ecfaae6bf51af6cc5e3aea934d1d3d58) --- infrastructure-playbooks/rolling_update.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 054655416..1cc107124 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -105,6 +105,21 @@ - (containerized_deployment | bool) or (dashboard_enabled | bool) - ceph_docker_registry_auth | bool + - name: check ceph release in container image + when: containerized_deployment | bool + delegate_to: "{{ groups[mon_group_name][0] }}" + run_once: true + block: + - name: get the ceph release being deployed + command: "{{ ceph_cmd }} --cluster {{ cluster }} --version" + register: ceph_version + changed_when: false + + - name: check ceph release being deployed + fail: + msg: "This version of ceph-ansible is intended for upgrading to Ceph Nautilus only." + when: "'nautilus' not in ceph_version.stdout.split()" + - name: set_fact rolling_update set_fact: rolling_update: true