]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: set cluster config prior to upgrading
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 13 Mar 2024 20:44:41 +0000 (21:44 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 15 Mar 2024 23:51:52 +0000 (00:51 +0100)
As 8.0 drops cluster config from ceph.conf by default, we need
to make sure this config is well applied as part of the upgrade to 8
(reef) from 7 (quincy)

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
infrastructure-playbooks/rolling_update.yml

index b1d50af1dbc7b15d13ceba2a7c918d98e71fea06..5a0a85043f1d04a9ab5bddc8166d998ab717b30d 100644 (file)
           when: "'reef' not in ceph_version.stdout.split()"
 
 
+- name: Ensure cluster config is applied
+  hosts: mons[0]
+  become: true
+  gather_facts: false
+  any_errors_fatal: true
+  tasks:
+    - name: Import default role
+      ansible.builtin.import_role:
+        name: ceph-defaults
+
+    - name: Import ceph-facts role
+      ansible.builtin.import_role:
+        name: ceph-facts
+        tasks_from: container_binary.yml
+
+    - name: Set cluster configs
+      ceph_config:
+        action: set
+        who: "{{ item.0.key }}"
+        option: "{{ item.1.key }}"
+        value: "{{ item.1.value }}"
+      when: item.1.value != omit
+      loop: "{{ ceph_cluster_conf | dict2dict }}"
+      environment:
+        CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
+        CEPH_CONTAINER_BINARY: "{{ container_binary }}"
+
+
 - name: Upgrade ceph mon cluster
   tags: mons
   vars: