]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_containers: do not try to redeploy monitors
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 8 Feb 2019 07:52:03 +0000 (08:52 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 13 Feb 2019 08:42:27 +0000 (09:42 +0100)
`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>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml
roles/ceph-mon/tasks/main.yml

index 8f931ddb742841f4304b86e88400f04764a391c7..b0c49d84cfc8d07e9af994465bb6fe91eccc55ee 100644 (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') }}"
index 5c95026d62b6ab100b07ed63f5741a5710934d97..ac158a08412dfcf27ade62fa12769b0ea90b5a82 100644 (file)
   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