diff --git a/oneshot/update-pvc-cluster.yml b/oneshot/update-pvc-cluster.yml index 26731c9..3c982b8 100644 --- a/oneshot/update-pvc-cluster.yml +++ b/oneshot/update-pvc-cluster.yml @@ -68,6 +68,14 @@ - name: flush node 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 shell: "virsh list | grep running | wc -l" register: virshcount @@ -76,14 +84,6 @@ retries: 60 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 pause: seconds: 15