]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch: do not fail on missing key
authorSébastien Han <seb@redhat.com>
Mon, 14 Jan 2019 15:31:45 +0000 (16:31 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Mon, 14 Jan 2019 18:54:46 +0000 (18:54 +0000)
Some people use the switch playbook to perform upgrade so they end up in
the same situation than https://bugzilla.redhat.com/show_bug.cgi?id=1650572
This is applying the same fix as
729744c6a8c69f5fdf66b67fb28063297996e30a.

We don't want to fail on key that are not present since they will get
created after the mons are updated. They will be created by the task
"create potentially missing keys (rbd and rbd-mirror)".

Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml
roles/ceph-defaults/defaults/main.yml
roles/ceph-mon/tasks/docker/fetch_configs.yml

index caa5a842c34b2a752ee9e047ddd1268a2d9a19ac..3614328089540990a05902b92d9badd4df3e646e 100644 (file)
@@ -565,6 +565,10 @@ dummy:
 # do not ever change this here
 #rolling_update: false
 
+# this is only here for usage with the switch-from-non-containerized-to-containerized-ceph-daemons.yml playbook
+# do not ever change this here
+#switch_to_container: false
+
 #####################
 # Docker pull retry #
 #####################
index a2c6c17552812bd462b6171131a622381da0a6c8..314576ca7bd8f8931e2dbf111878b5617cc424e7 100644 (file)
@@ -565,6 +565,10 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
 # do not ever change this here
 #rolling_update: false
 
+# this is only here for usage with the switch-from-non-containerized-to-containerized-ceph-daemons.yml playbook
+# do not ever change this here
+#switch_to_container: false
+
 #####################
 # Docker pull retry #
 #####################
index 1267396243a6048f50ca8cbc9e98667245e70650..2dcff570da14745df7241f86cc2238b05d8de8d7 100644 (file)
   become: true
 
   pre_tasks:
+    - name: set_fact switch_to_container to indicate that we run a special playbook
+      set_fact:
+        switch_to_container: True
+
     - name: select a running monitor
       set_fact: mon_host={{ item }}
       with_items: "{{ groups[mon_group_name] }}"
index c39bf33c67085252e53458e72dcb6599d5bfe073..9910aed7dfaec05df9b8510ddd973e8d8a8d7f96 100644 (file)
@@ -557,6 +557,10 @@ kv_port: 2379
 # do not ever change this here
 rolling_update: false
 
+# this is only here for usage with the switch-from-non-containerized-to-containerized-ceph-daemons.yml playbook
+# do not ever change this here
+switch_to_container: false
+
 #####################
 # Docker pull retry #
 #####################
index a1433e5e3b2e2990f5b5041f69cd74edeb065615..27b80c2ab0eae861006f8acd389212df3989cf6e 100644 (file)
@@ -4,7 +4,7 @@
     src: "{{ item.0 }}"
     dest: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
     flat: yes
-    fail_on_missing: "{{ 'no' if rolling_update else 'yes' }}"
+    fail_on_missing: "{{ 'no' if rolling_update or switch_to_container else 'yes' }}"
   with_together:
     - "{{ ceph_config_keys }}"
     - "{{ statconfig.results }}"