]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: check the ceph release
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 26 Jul 2021 09:19:36 +0000 (11:19 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 26 Jul 2021 16:11:22 +0000 (18:11 +0200)
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 <gabrioux@redhat.com>
infrastructure-playbooks/rolling_update.yml

index de86a04eb096f275039f08af1e3989bace80a6c3..6da698da1bac86511bc47a745957fac8f6c16fe2 100644 (file)
         - (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 Quincy only."
+          when: "'quincy' not in ceph_version.stdout.split()"
+
     - name: set_fact rolling_update
       set_fact:
         rolling_update: true