]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling_update.yml will not work if cluster name is not 'ceph'. Adding --cluster... ceph-ansible-1.0.5-34
authorRachana Patel <rachana83.patel@gmail.com>
Tue, 6 Sep 2016 14:29:00 +0000 (10:29 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 23 Sep 2016 15:36:13 +0000 (11:36 -0400)
 Fixes issue #969

Signed-off-by: Rachana Patel <rachana83.patel@gmail.com>
Resolves: rhbz#1373919

rolling_update.yml

index 2bdf0b4421ca88f4634b150100a0b382c7cf45df..6c112d06000cfd7258f66ca934e3e627bb83ef39 100644 (file)
@@ -92,7 +92,7 @@
 
     - name: waiting for the monitor to join the quorum...
       shell: |
-        ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
+        ceph -s  --cluster {{ cluster }} | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
       register: result
       until: result.rc == 0
       retries: 5
 
   pre_tasks:
     - name: set osd flags
-      command: ceph osd set {{ item }}
+      command: ceph osd set {{ item }} --cluster {{ cluster }}
       with_items:
         - noout
         - noscrub
 
     - name: waiting for clean pgs...
       shell: |
-        test "$(ceph pg stat | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(ceph pg stat | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
+        test "$(ceph pg stat --cluster {{ cluster }} | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(ceph pg stat --cluster {{ cluster }}  | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health --cluster {{ cluster }}  | egrep -sq "HEALTH_OK|HEALTH_WARN"
       register: result
       until: result.rc == 0
       retries: 10
       delegate_to: "{{ groups.mons[0] }}"
 
     - name: unset osd flags
-      command: ceph osd unset {{ item }}
+      command: ceph osd unset {{ item }} --cluster {{ cluster }}
       with_items:
         - noout
         - noscrub