Skip to content

Commit f02f4e2

Browse files
authored
Merge pull request #6585 from dzhengfy/fix_migration_xbzrle_parallel
migrate_options_shared:fix removing vm
2 parents 13d7522 + c25b56c commit f02f4e2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

libvirt/tests/cfg/migration/migrate_options_shared.cfg

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,6 @@
387387
virsh_migrate_extra = "--parallel --parallel-connections"
388388
parallel_cn_nums = 4
389389
- default_connection:
390-
- with_xbzrle_method:
391-
only without_postcopy
392-
virsh_migrate_extra = "--comp-methods xbzrle --parallel --parallel-connections"
393-
parallel_cn_nums = 4
394-
err_msg = "Compression method 'xbzrle' isn't supported with parallel migration"
395390
- check_domstats:
396391
asynch_migrate = "yes"
397392
virsh_opt = ' -k0'
@@ -523,6 +518,10 @@
523518
parallel_cn_nums = 0
524519
- set_cross_border:
525520
parallel_cn_nums = 256
521+
- with_xbzrle_method:
522+
virsh_migrate_extra = "--comp-methods xbzrle --parallel --parallel-connections"
523+
parallel_cn_nums = 4
524+
err_msg = "Compression method 'xbzrle' isn't supported with parallel migration"
526525
- cache_unsafe:
527526
# Without '--unsafe', migration will fail and throw an error message
528527
err_msg = "Unsafe migration: Migration may lead to data corruption"

libvirt/tests/src/migration/migrate_options_shared.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,8 @@ def cancel_bg_migration():
16021602
"should not more than 1 second")
16031603
if params.get("actions_after_migration"):
16041604
do_actions_after_migrate(params)
1605-
1606-
if migrate_vm_back:
1605+
status_error = params.get("status_error", "no") == "yes"
1606+
if migrate_vm_back and not status_error:
16071607
ssh_connection = utils_conn.SSHConnection(server_ip=client_ip,
16081608
server_pwd=client_pwd,
16091609
client_ip=server_ip,
@@ -1675,7 +1675,7 @@ def cancel_bg_migration():
16751675
remote_session.close()
16761676

16771677
# Clean up of pre migration setup for local machine
1678-
if migrate_vm_back:
1678+
if migrate_vm_back and not status_error:
16791679
if 'ssh_connection' in locals():
16801680
ssh_connection.auto_recover = True
16811681
if 'src_full_uri' in locals():

0 commit comments

Comments
 (0)