]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Check for docker sockets named after both _hostname or _fqdn v3.0.24
authorGiulio Fidente <gfidente@redhat.com>
Fri, 2 Feb 2018 08:45:07 +0000 (09:45 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 6 Feb 2018 15:39:20 +0000 (16:39 +0100)
While hostname -f will always return an hostname including its
domain part and -s without the domain part, the behavior when
no arguments are given can include or not include the domain part
depending on how the system is configured; the socket name might
not match the instance name then.

(cherry picked from commit bdcc52b96dc1f9c99ce490117170f644623d4846)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-mds/tasks/containerized.yml
roles/ceph-mon/tasks/docker/main.yml

index afa52c2b516060d6bb41a9b88254be4db4917c63..207ed69ef33720daa07edd9e74c65e2f7b989364 100644 (file)
@@ -63,7 +63,7 @@
   changed_when: false
 
 - name: wait for mds socket to exist
-  command: "{{ docker_exec_cmd }} stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok"
+  command: "{{ docker_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_fqdn }}.asok'"
   register: multi_mds_socket
   retries: 5
   delay: 15
index 5aff76b0d25fb0a4449f7006ecd3628dcd9c9358..dc8d2e4ffa1b0a130b52bd2a198dff1943d9c444 100644 (file)
@@ -7,7 +7,7 @@
   include: start_docker_monitor.yml
 
 - name: wait for monitor socket to exist
-  command: docker exec ceph-mon-{{ ansible_hostname }} stat /var/run/ceph/{{ cluster }}-mon.{{ monitor_name }}.asok
+  command: "docker exec ceph-mon-{{ ansible_hostname }} sh -c 'stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok'"
   register: monitor_socket
   retries: 5
   delay: 15