mirror of https://github.com/ceph/ceph-ansible.git
commit
a8c1309e72
|
@ -284,13 +284,13 @@
|
|||
when: migration_completed.stat.exists == False
|
||||
|
||||
- name: Check if sysvinit
|
||||
shell: stat /var/lib/ceph/osd/ceph-*/sysvinit
|
||||
stat: path=/var/lib/ceph/osd/ceph-*/sysvinit
|
||||
register: osdsysvinit
|
||||
failed_when: false
|
||||
changed_when: False
|
||||
|
||||
- name: Check if upstart
|
||||
shell: stat /var/lib/ceph/osd/ceph-*/upstart
|
||||
stat: path=/var/lib/ceph/osd/ceph-*/upstart
|
||||
register: osdupstart
|
||||
failed_when: false
|
||||
changed_when: False
|
||||
|
@ -329,14 +329,14 @@
|
|||
service: >
|
||||
name=ceph-osd-all
|
||||
state=stopped
|
||||
when: osdupstart.rc == 0 and migration_completed.stat.exists == False
|
||||
when: osdupstart.stat.exists and migration_completed.stat.exists == False
|
||||
|
||||
- name: Gracefully stop the OSDs (Sysvinit)
|
||||
service: >
|
||||
name=ceph
|
||||
state=stopped
|
||||
args=mon
|
||||
when: osdsysvinit.rc == 0 and migration_completed.stat.exists == False
|
||||
when: osdsysvinit.stat.exists and migration_completed.stat.exists == False
|
||||
|
||||
- name: Wait for the OSDs to be down
|
||||
local_action: >
|
||||
|
|
|
@ -5,63 +5,63 @@
|
|||
- name: restart ceph mons
|
||||
command: service ceph restart mon
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution != 'Ubuntu' and
|
||||
mon_group_name in group_names
|
||||
|
||||
- name: restart ceph mons on ubuntu
|
||||
command: restart ceph-mon-all
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
mon_group_name in group_names
|
||||
|
||||
- name: restart ceph osds
|
||||
command: service ceph restart osd
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution != 'Ubuntu' and
|
||||
osd_group_name in group_names
|
||||
|
||||
- name: restart ceph osds on ubuntu
|
||||
command: restart ceph-osd-all
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
osd_group_name in group_names
|
||||
|
||||
- name: restart ceph mdss on ubuntu
|
||||
command: restart ceph-mds-all
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
mds_group_name in group_names
|
||||
|
||||
- name: restart ceph mdss
|
||||
command: service ceph restart mds
|
||||
when:
|
||||
socket.rc == 0 and
|
||||
socket.stat.exists and
|
||||
ansible_distribution != 'Ubuntu' and
|
||||
mds_group_name in group_names
|
||||
|
||||
- name: restart ceph rgws on ubuntu
|
||||
command: restart ceph-all
|
||||
when:
|
||||
socketrgw.rc == 0 and
|
||||
socketrgw.stat.exists and
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
rgw_group_name in group_names
|
||||
|
||||
- name: restart ceph rgws
|
||||
command: /etc/init.d/radosgw restart
|
||||
when:
|
||||
socketrgw.rc == 0 and
|
||||
socketrgw.stat.exists and
|
||||
ansible_distribution != 'Ubuntu' and
|
||||
rgw_group_name in group_names
|
||||
|
||||
- name: restart ceph rgws on red hat
|
||||
command: /etc/init.d/ceph-radosgw restart
|
||||
when:
|
||||
socketrgw.rc == 0 and
|
||||
socketrgw.stat.exists and
|
||||
ansible_os_family == 'RedHat' and
|
||||
rgw_group_name in group_names
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@
|
|||
rgw_group_name in group_names
|
||||
|
||||
- name: check for a ceph socket
|
||||
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
|
||||
stat: path=/var/run/ceph/*.asok
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: socket
|
||||
|
||||
- name: check for a rados gateway socket
|
||||
shell: "stat {{ rbd_client_admin_socket_path }}*.asok > /dev/null 2>&1"
|
||||
stat: path={{ rbd_client_admin_socket_path }}*.asok
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: socketrgw
|
||||
|
|
|
@ -90,12 +90,12 @@
|
|||
|
||||
post_tasks:
|
||||
- name: Check if sysvinit
|
||||
shell: stat /var/lib/ceph/osd/ceph-*/sysvinit
|
||||
stat: path=/var/lib/ceph/osd/ceph-*/sysvinit
|
||||
register: osdsysvinit
|
||||
failed_when: false
|
||||
|
||||
- name: Check if upstart
|
||||
shell: stat /var/lib/ceph/osd/ceph-*/upstart
|
||||
stat: path=/var/lib/ceph/osd/ceph-*/upstart
|
||||
register: osdupstart
|
||||
failed_when: false
|
||||
|
||||
|
@ -103,14 +103,14 @@
|
|||
service: >
|
||||
name=ceph-osd-all
|
||||
state=restarted
|
||||
when: osdupstart.rc == 0
|
||||
when: osdupstart.stat.exists
|
||||
|
||||
- name: Gracefully stop the OSDs (Sysvinit)
|
||||
service: >
|
||||
name=ceph
|
||||
state=restarted
|
||||
args=osd
|
||||
when: osdsysvinit.rc == 0
|
||||
when: osdsysvinit.stat.exists
|
||||
|
||||
- name: Waiting for clean PGs...
|
||||
shell: >
|
||||
|
|
Loading…
Reference in New Issue