mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1871 from ceph/handler-collocate
defaults: do not restart unconfigured (yet) daemonspull/1875/head
commit
b59e9cc732
|
@ -19,7 +19,7 @@
|
|||
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
|
||||
|
@ -57,7 +57,7 @@
|
|||
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
|
||||
|
@ -76,12 +76,18 @@
|
|||
- 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
|
||||
|
@ -101,7 +107,7 @@
|
|||
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
|
||||
|
|
|
@ -1,12 +1,52 @@
|
|||
---
|
||||
# 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: |
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
- name: wait for mds socket to exist
|
||||
command: "{{ docker_exec_cmd }} stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok"
|
||||
register: mds_socket
|
||||
register: multi_mds_socket
|
||||
retries: 5
|
||||
delay: 15
|
||||
until: mds_socket.rc == 0
|
||||
until: multi_mds_socket.rc == 0
|
||||
|
||||
- name: enable multimds if requested when mon is containerized
|
||||
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} fs set {{ cephfs }} allow_multimds true --yes-i-really-mean-it"
|
||||
|
|
Loading…
Reference in New Issue