-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5948 from cliping/mig-again
migration: Add case to test migrate vm again
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
libvirt/tests/cfg/migration/async_ops/migrate_vm_again_during_migration.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
- migration.async_ops.migrate_vm_again_during_migration: | ||
type = migrate_vm_again_during_migration | ||
migration_setup = 'yes' | ||
storage_type = 'nfs' | ||
setup_local_nfs = 'yes' | ||
disk_type = "file" | ||
disk_source_protocol = "netfs" | ||
mnt_path_name = ${nfs_mount_dir} | ||
# Console output can only be monitored via virsh console output | ||
only_pty = True | ||
take_regular_screendumps = no | ||
# Extra options to pass after <domain> <desturi> | ||
virsh_migrate_extra = '' | ||
# SSH connection time out | ||
ssh_timeout = 60 | ||
# Local URI | ||
virsh_migrate_connect_uri = 'qemu:///system' | ||
virsh_migrate_dest_state = "running" | ||
virsh_migrate_src_state = "shut off" | ||
image_convert = 'no' | ||
server_ip = "${migrate_dest_host}" | ||
server_user = "root" | ||
server_pwd = "${migrate_dest_pwd}" | ||
status_error = "no" | ||
migrate_desturi_port = "16509" | ||
migrate_desturi_type = "tcp" | ||
virsh_migrate_desturi = "qemu+tcp://${migrate_dest_host}/system" | ||
migrate_speed = "20" | ||
do_migration_during_mig = "yes" | ||
action_during_mig = [{"func": "do_migration", "after_event": "iteration: '1'", "func_param": "params"}] | ||
status_error_during_mig = "yes" | ||
err_msg_during_mig = "another migration job is already running for domain" | ||
variants: | ||
- p2p: | ||
virsh_migrate_options = '--live --p2p --verbose' | ||
- non_p2p: | ||
virsh_migrate_options = '--live --verbose' |
23 changes: 23 additions & 0 deletions
23
libvirt/tests/src/migration/async_ops/migrate_vm_again_during_migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from provider.migration import base_steps | ||
|
||
|
||
def run(test, params, env): | ||
""" | ||
To verify that libvirt can report clear error when migrating vm again | ||
before the last migration completes. | ||
:param test: test object | ||
:param params: Dictionary with the test parameters | ||
:param env: Dictionary with test environment. | ||
""" | ||
vm_name = params.get("migrate_main_vm") | ||
|
||
vm = env.get_vm(vm_name) | ||
migration_obj = base_steps.MigrationBase(test, vm, params) | ||
|
||
try: | ||
migration_obj.setup_connection() | ||
migration_obj.run_migration() | ||
migration_obj.verify_default() | ||
finally: | ||
migration_obj.cleanup_connection() |