Merge pull request #2068 from ceph/fix-collocation2

defaults: fix handlers for collocation
pull/1998/merge
Sébastien Han 2017-10-18 09:15:50 +02:00 committed by GitHub
commit 6320f3aac7
1 changed files with 40 additions and 14 deletions

View File

@ -24,8 +24,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mon_group_name in group_names - mon_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(mon_group_name) | last
- inventory_hostname in play_hosts
- mon_socket_stat.rc == 0 - mon_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mon_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -36,8 +38,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mon_group_name in group_names - mon_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(mon_group_name) | last
- inventory_hostname in play_hosts
- ceph_mon_container_stat.get('stdout_lines', [])|length != 0 - ceph_mon_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mon_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -62,6 +66,7 @@
when: when:
- osd_group_name in group_names - osd_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(osd_group_name) | last
# We do not want to run these checks on initial deployment (`socket_osd_container.results[n].rc == 0`) # 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 # 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 osd_socket_stat.rc == 0) - ((crush_location is defined and crush_location) or osd_socket_stat.rc == 0)
@ -69,7 +74,7 @@
- handler_health_osd_check - handler_health_osd_check
# See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below # See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below
- inventory_hostname in play_hosts - inventory_hostname in play_hosts
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[osd_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -81,11 +86,12 @@
# except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified # except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified
- osd_group_name in group_names - osd_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(osd_group_name) | last
- ((crush_location is defined and crush_location) or ceph_osd_container_stat.get('stdout_lines', [])|length != 0) - ((crush_location is defined and crush_location) or ceph_osd_container_stat.get('stdout_lines', [])|length != 0)
- handler_health_osd_check - handler_health_osd_check
# See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below # See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below
- inventory_hostname in play_hosts - inventory_hostname in play_hosts
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[osd_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -108,8 +114,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mds_group_name in group_names - mds_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(mds_group_name) | last
- inventory_hostname in play_hosts
- mds_socket_stat.rc == 0 - mds_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mds_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -120,8 +128,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mds_group_name in group_names - mds_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(mds_group_name) | last
- inventory_hostname in play_hosts
- ceph_mds_container_stat.get('stdout_lines', [])|length != 0 - ceph_mds_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mds_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -144,8 +154,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rgw_group_name in group_names - rgw_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(rgw_group_name) | last
- inventory_hostname in play_hosts
- rgw_socket_stat.rc == 0 - rgw_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[rgw_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -156,8 +168,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rgw_group_name in group_names - rgw_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(rgw_group_name) | last
- inventory_hostname in play_hosts
- ceph_rgw_container_stat.get('stdout_lines', [])|length != 0 - ceph_rgw_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[rgw_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -180,8 +194,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- nfs_group_name in group_names - nfs_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(nfs_group_name) | last
- inventory_hostname in play_hosts
- nfs_socket_stat.rc == 0 - nfs_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[nfs_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -192,8 +208,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- nfs_group_name in group_names - nfs_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(nfs_group_name) | last
- inventory_hostname in play_hosts
- ceph_nfs_container_stat.get('stdout_lines', [])|length != 0 - ceph_nfs_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[nfs_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -216,8 +234,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rbdmirror_group_name in group_names - rbdmirror_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(rbdmirror_group_name) | last
- inventory_hostname in play_hosts
- rbd_mirror_socket_stat.rc == 0 - rbd_mirror_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[rbdmirror_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -228,8 +248,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rbdmirror_group_name in group_names - rbdmirror_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(rbdmirror_group_name) | last
- inventory_hostname in play_hosts
- ceph_rbd_mirror_container_stat.get('stdout_lines', [])|length != 0 - ceph_rbd_mirror_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[rbdmirror_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -252,8 +274,10 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mgr_group_name in group_names - mgr_group_name in group_names
- not containerized_deployment - not containerized_deployment
- inventory_hostname == groups.get(mgr_group_name) | last
- inventory_hostname in play_hosts
- mgr_socket_stat.rc == 0 - mgr_socket_stat.rc == 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mgr_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
@ -264,7 +288,9 @@
# We do not want to run these checks on initial deployment (`socket.rc == 0`) # We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mgr_group_name in group_names - mgr_group_name in group_names
- containerized_deployment - containerized_deployment
- inventory_hostname == groups.get(mgr_group_name) | last
- inventory_hostname in play_hosts
- ceph_mgr_container_stat.get('stdout_lines', [])|length != 0 - ceph_mgr_container_stat.get('stdout_lines', [])|length != 0
with_items: "{{ ansible_play_batch }}" with_items: "{{ groups[mgr_group_name] }}"
run_once: true run_once: true
delegate_to: "{{ item }}" delegate_to: "{{ item }}"