rolling update: stop RGWs before upgrade and start afterwards

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: rhbz#1394929
pull/1093/head
Andrew Schoen 2016-11-14 14:44:55 -06:00
parent ded9d9dfd3
commit 5f44b118b8
1 changed files with 33 additions and 6 deletions

View File

@ -353,6 +353,33 @@
serial: 1
become: True
pre_tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
failed_when: false
- name: stop ceph rgws with systemd
service:
name: ceph-radosgw@rgw.{{ ansible_hostname }}
state: stopped
enabled: yes
when: is_systemd
- name: stop ceph rgws with sysvinit
service:
name: radosgw
state: stopped
when: is_sysvinit.stat.exists == True
- name: stop ceph rgws with upstart
service:
name: ceph-radosgw
state: stopped
when: is_upstart.stat.exists == True
roles:
- ceph-common
- ceph-rgw
@ -365,21 +392,21 @@
- include_vars: group_vars/{{ rgw_group_name }}
failed_when: false
- name: restart ceph rgws with systemd
- name: start ceph rgws with systemd
service:
name: ceph-radosgw@rgw.{{ ansible_hostname }}
state: restarted
state: started
enabled: yes
when: is_systemd
- name: restart ceph rgws with sysvinit
- name: start ceph rgws with sysvinit
service:
name: radosgw
state: restarted
state: started
when: is_sysvinit.stat.exists == True
- name: restart ceph rgws with upstart
- name: start ceph rgws with upstart
service:
name: ceph-radosgw
state: restarted
state: started
when: is_upstart.stat.exists == True