Skip to contentSkip to conversation

iotests.py: Wait for postmigrate in wait_migration

PATCH Applied Max Reitz 2 participants 3 messages Dec 19, 2019

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 iotests.py: Wait for postmigrate in wait_migration

Without this patch, I see intermittent failures in the new iotest 280 under high system load. I have not yet seen such failures with other iotests that use VM.wait_migration() and query-status afterwards, but maybe they just occur even more rarely.

---
 tests/qemu-iotests/iotests.py | 3 +++
 1 file changed, 3 insertions(+)
tests/qemu-iotests/iotests.py +3 -0
index 13fd8b5cd2..4da25c88f5 100644
@@ -674,6 +674,9 @@ class VM(qtest.QEMUQtestMachine):
             log(event, filters=[filter_qmp_event])
             if event['data']['status'] == 'completed':
                 break
+        # The event may occur in finish-migrate, so wait for postmigrate
+        while self.qmp('query-status')['return']['status'] != 'postmigrate':
+            pass
 
     def node_info(self, node_name):
         nodes = self.qmp('query-named-block-nodes')
Signature · 1 line
2.23.0
Applied
#1 lore raw

Am 19.12.2019 um 16:51 hat Max Reitz geschrieben:

Quoted 6 lines

Without this patch, I see intermittent failures in the new iotest 280 under high system load. I have not yet seen such failures with other iotests that use VM.wait_migration() and query-status afterwards, but maybe they just occur even more rarely.

Thanks, applied to the block branch.

Kevin

#2 lore raw

Am 19.12.2019 um 17:01 hat Kevin Wolf geschrieben:

Quoted 9 lines

Am 19.12.2019 um 16:51 hat Max Reitz geschrieben:

Quoted 6 lines

Without this patch, I see intermittent failures in the new iotest 280 under high system load. I have not yet seen such failures with other iotests that use VM.wait_migration() and query-status afterwards, but maybe they just occur even more rarely.

Thanks, applied to the block branch.

...and unqueuing it again because it makes 234 and 262 hang.

Kevin