Add tasks to verify node has finished (un)flushing
This commit is contained in:
		@@ -56,6 +56,14 @@
 | 
				
			|||||||
          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 30 seconds for system to stabilize
 | 
					        - name: wait 30 seconds for system to stabilize
 | 
				
			||||||
          pause:
 | 
					          pause:
 | 
				
			||||||
            seconds: "30"
 | 
					            seconds: "30"
 | 
				
			||||||
@@ -137,7 +145,15 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        - name: unflush node
 | 
					        - name: unflush node
 | 
				
			||||||
          command: "pvc node ready {{ ansible_hostname }} --wait"
 | 
					          command: "pvc node ready {{ ansible_hostname }} --wait"
 | 
				
			||||||
  
 | 
					 
 | 
				
			||||||
 | 
					        - name: make sure all VMs have returned
 | 
				
			||||||
 | 
					          shell: "pvc node info {{ ansible_hostname }} | grep '^Domain State' | awk '{ print $NF }'"
 | 
				
			||||||
 | 
					          register: pvcunflush
 | 
				
			||||||
 | 
					          failed_when: pvcunflush.stdout != 'ready'
 | 
				
			||||||
 | 
					          until: pvcunflush.stdout == 'ready'
 | 
				
			||||||
 | 
					          retries: 60
 | 
				
			||||||
 | 
					          delay: 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        - name: wait 30 seconds for system to stabilize
 | 
					        - name: wait 30 seconds for system to stabilize
 | 
				
			||||||
          pause:
 | 
					          pause:
 | 
				
			||||||
            seconds: "30"
 | 
					            seconds: "30"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user