mirror of https://github.com/ceph/ceph-ansible.git
rolling_update.yml will not work if cluster name is not 'ceph'. Adding --cluster will solve this problem
Fixes issue #969 Signed-off-by: Rachana Patel <rachana83.patel@gmail.com>pull/972/head
parent
ca4d4482ef
commit
ad5805f03e
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: compress the store as much as possible
|
- name: compress the store as much as possible
|
||||||
command: ceph tell mon.{{ ansible_hostname }} compact
|
command: ceph tell mon.{{ ansible_hostname }} compact --cluster {{ cluster }}
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- ceph-common
|
- ceph-common
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
|
|
||||||
- name: waiting for the monitor to join the quorum...
|
- name: waiting for the monitor to join the quorum...
|
||||||
shell: |
|
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
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
retries: 5
|
retries: 5
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: set osd flags
|
- name: set osd flags
|
||||||
command: ceph osd set {{ item }}
|
command: ceph osd set {{ item }} --cluster {{ cluster }}
|
||||||
with_items:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
- noscrub
|
- noscrub
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
- name: waiting for clean pgs...
|
- name: waiting for clean pgs...
|
||||||
shell: |
|
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
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
retries: 10
|
retries: 10
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
delegate_to: "{{ groups.mons[0] }}"
|
delegate_to: "{{ groups.mons[0] }}"
|
||||||
|
|
||||||
- name: unset osd flags
|
- name: unset osd flags
|
||||||
command: ceph osd unset {{ item }}
|
command: ceph osd unset {{ item }} --cluster {{ cluster }}
|
||||||
with_items:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
- noscrub
|
- noscrub
|
||||||
|
|
Loading…
Reference in New Issue