switch: do not fail on missing key

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
729744c6a8.

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>
pull/3502/head
Sébastien Han 2019-01-14 16:31:45 +01:00 committed by mergify[bot]
parent 4e94d11aa7
commit 04d8002614
5 changed files with 17 additions and 1 deletions

View File

@ -565,6 +565,10 @@ dummy:
# do not ever change this here # do not ever change this here
#rolling_update: false #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 # # Docker pull retry #
##################### #####################

View File

@ -565,6 +565,10 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
# do not ever change this here # do not ever change this here
#rolling_update: false #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 # # Docker pull retry #
##################### #####################

View File

@ -62,6 +62,10 @@
become: true become: true
pre_tasks: 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 - name: select a running monitor
set_fact: mon_host={{ item }} set_fact: mon_host={{ item }}
with_items: "{{ groups[mon_group_name] }}" with_items: "{{ groups[mon_group_name] }}"

View File

@ -557,6 +557,10 @@ kv_port: 2379
# do not ever change this here # do not ever change this here
rolling_update: false 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 # # Docker pull retry #
##################### #####################

View File

@ -4,7 +4,7 @@
src: "{{ item.0 }}" src: "{{ item.0 }}"
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}" dest: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
flat: yes 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: with_together:
- "{{ ceph_config_keys }}" - "{{ ceph_config_keys }}"
- "{{ statconfig.results }}" - "{{ statconfig.results }}"