Skip to content

Commit

Permalink
Check for docker sockets named after both _hostname or _fqdn
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gfidente authored and leseb committed Feb 6, 2018
1 parent a6d1922 commit bdcc52b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/ceph-mds/tasks/containerized.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-mon/tasks/docker/main.yml
Expand Up @@ -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
Expand Down

0 comments on commit bdcc52b

Please sign in to comment.