]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling update: stop RGWs before upgrade and start afterwards 1093/head
authorAndrew Schoen <aschoen@redhat.com>
Mon, 14 Nov 2016 20:44:55 +0000 (14:44 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Mon, 14 Nov 2016 20:47:12 +0000 (14:47 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Resolves: rhbz#1394929

infrastructure-playbooks/rolling_update.yml

index d058b47c86f6efd66d5bc6e257499d48f6ad327f..461a1da4c75f5990e74161b15ed334f62b0b16ec 100644 (file)
   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
     - 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