switch_to_containers: do not try to redeploy monitors

`ceph-mon` tries to redeploy monitors because it assumes it was not yet
deployed since `mon_socket_stat` and `ceph_mon_container_stat` are
undefined (indeed, we stop the daemon before calling `ceph-mon` in the
switch_to_containers playbook).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3594/head
Guillaume Abrioux 2019-02-08 08:52:03 +01:00 committed by Sébastien Han
parent ad3a489847
commit 7e0a70f7a8
2 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,7 @@
health_mon_check_retries: 5
health_mon_check_delay: 15
containerized_deployment: true
switch_to_containers: True
mon_group_name: mons
hosts:
- "{{ mon_group_name|default('mons') }}"

View File

@ -10,12 +10,15 @@
when:
# we test for both container and non-container
- (mon_socket_stat is defined and mon_socket_stat.get('rc') != 0) or (ceph_mon_container_stat is defined and ceph_mon_container_stat.get('stdout_lines', [])|length == 0)
- not switch_to_containers | default(False)
- name: include start_monitor.yml
include_tasks: start_monitor.yml
- name: include_tasks ceph_keys.yml
include_tasks: ceph_keys.yml
when:
- not switch_to_containers | default(False)
- name: include secure_cluster.yml
include_tasks: secure_cluster.yml