listen: "restart ceph mons"
when:
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- - socket.rc == 0
+ - mon_socket.rc == 0
- mon_group_name in group_names
# This does not just restart OSDs but everything else too. Unfortunately
when:
# We do not want to run these checks on initial deployment (`socket_osd_container.results[n].rc == 0`)
# except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified
- - ((crush_location is defined and crush_location) or socket.rc == 0)
+ - ((crush_location is defined and crush_location) or osd_socket.rc == 0)
- ceph_current_fsid.rc == 0
- handler_health_osd_check
# See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below
- inventory_hostname in play_hosts
- mds_group_name in group_names
+- name: debug socket mds
+ debug: msg="{{mds_socket}}"
+ listen: "restart ceph mdss"
+ when:
+ - mds_group_name in group_names
+
- name: restart ceph mds daemon(s)
command: /tmp/restart_mds_daemon.sh
listen: "restart ceph mdss"
when:
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- - socket.rc == 0
+ - mds_socket.rc == 0
- mds_group_name in group_names
- name: copy rgw restart script
listen: "restart ceph rgws"
when:
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- - socket.rc == 0
+ - rgw_socket.rc == 0
- rgw_group_name in group_names
- name: restart ceph nfss
---
# These checks are used to avoid running handlers at initial deployment.
-- name: check for a ceph socket
+- name: check for a ceph mon socket
shell: |
- {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/*.asok > /dev/null 2>&1'
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mon*.asok > /dev/null 2>&1'
changed_when: false
failed_when: false
always_run: true
- register: socket
+ register: mon_socket
+
+- name: check for a ceph osd socket
+ shell: |
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-osd*.asok > /dev/null 2>&1'
+ changed_when: false
+ failed_when: false
+ always_run: true
+ register: osd_socket
+
+- name: check for a ceph mds socket
+ shell: |
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mds*.asok > /dev/null 2>&1'
+ changed_when: false
+ failed_when: false
+ always_run: true
+ register: mds_socket
+
+- name: check for a ceph rgw socket
+ shell: |
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rgw*.asok > /dev/null 2>&1'
+ changed_when: false
+ failed_when: false
+ always_run: true
+ register: rgw_socket
+
+- name: check for a ceph mgr socket
+ shell: |
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mgr*.asok > /dev/null 2>&1'
+ changed_when: false
+ failed_when: false
+ always_run: true
+ register: mgr_socket
+
+- name: check for a ceph rbd mirror socket
+ shell: |
+ {{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rbd-mirror*.asok > /dev/null 2>&1'
+ changed_when: false
+ failed_when: false
+ always_run: true
+ register: rbd_mirror_socket
- name: check for a ceph socket in containerized deployment (osds)
shell: |