Adjust ordering of flush task
This commit is contained in:
parent
eef0f959dd
commit
2d9a5a9d31
|
@ -68,6 +68,14 @@
|
||||||
- name: flush node
|
- name: flush node
|
||||||
command: "pvc node flush {{ ansible_hostname }} --wait"
|
command: "pvc node flush {{ ansible_hostname }} --wait"
|
||||||
|
|
||||||
|
- name: make sure node is in flushed state
|
||||||
|
shell: "pvc node info {{ ansible_hostname }} | grep '^Domain State' | awk '{ print $NF }'"
|
||||||
|
register: pvcflush
|
||||||
|
failed_when: pvcflush.stdout != 'flushed'
|
||||||
|
until: pvcflush.stdout == 'flushed'
|
||||||
|
retries: 60
|
||||||
|
delay: 10
|
||||||
|
|
||||||
- name: ensure VMs are migrated away
|
- name: ensure VMs are migrated away
|
||||||
shell: "virsh list | grep running | wc -l"
|
shell: "virsh list | grep running | wc -l"
|
||||||
register: virshcount
|
register: virshcount
|
||||||
|
@ -76,14 +84,6 @@
|
||||||
retries: 60
|
retries: 60
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|
||||||
- name: make sure all VMs have migrated
|
|
||||||
shell: "pvc node info {{ ansible_hostname }} | grep '^Domain State' | awk '{ print $NF }'"
|
|
||||||
register: pvcflush
|
|
||||||
failed_when: pvcflush.stdout != 'flushed'
|
|
||||||
until: pvcflush.stdout == 'flushed'
|
|
||||||
retries: 60
|
|
||||||
delay: 10
|
|
||||||
|
|
||||||
- name: wait 15 seconds for system to stabilize
|
- name: wait 15 seconds for system to stabilize
|
||||||
pause:
|
pause:
|
||||||
seconds: 15
|
seconds: 15
|
||||||
|
|
Loading…
Reference in New Issue