
Kaitlin Rupert wrote:
-def get_migration_job_instance(ip, virt, id): +def get_migration_job_instance(src_ip, virt, id): job = [] - key_list = ["instanceid"] - curr_cim_rev, changeset = get_provider_version(virt, ip) + curr_cim_rev, changeset = get_provider_version(virt, src_ip) if curr_cim_rev < libvirt_mig_changes: mig_job_cn = 'Virt_MigrationJob' else: mig_job_cn = get_typed_class(virt, 'MigrationJob')
try: - job = enumclass.EnumInstances(ip, mig_job_cn) + job = enumclass.EnumInstances(src_ip, mig_job_cn) + if len(job) < 1:
Can you print an error here indicating that no job instances were returned?
-def verify_domain_list(list, local_migrate, test_dom): - status = PASS - if local_migrate == 0 and test_dom not in list: - status = FAIL - if local_migrate == 1 and test_dom in list: +def verify_domain_list(remote_migrate, test_dom, src_ip, target_ip): + status = FAIL + list_src = domain_list(src_ip) + if remote_migrate == 0: + if test_dom in list_src: + status = PASS + elif remote_migrate == 1 : + list_target = domain_list(target_ip)
The verification fails for me when migrating a KVM guest. Here's the error message I see:
VirtualSystemMigrationService - 06_remote_migration.py: FAIL ERROR - Migration verification for 'f10_test' failed
You'll need to specify the virtualization type - otherwise, it calls domain_list() for Xen hyp. Here's what I see when I print the contents of the list_src and list_target:
['Xen', 'Xen', 'failed']
+ if test_dom not in list_src and test_dom in list_target: + status = PASS + else: + logger.error("Invalid migration option") + + if status != PASS: + logger.error("Migration verification for '%s' failed", test_dom) + return status + + return status + +def check_migration_job(src_ip, id, target_ip, test_dom, + remote_migrate, virt='Xen', timeout=50): + try: + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Unable to get mig_job instance for '%s'", test_dom) + return FAIL + status = FAIL
- if status != PASS: - logger.error("%s migrate failed", test_dom) + for i in range(0, timeout): + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: + sleep(3) + if job_inst.Status != "Completed": + logger.error("Failed to set the status for the migrated " \ + "dom: '%s'", test_dom)
Can you also print the job_inst.Status as well? Right now, libvirt doesn't print much when a migration fails, but it might print more info in the future.
I shall take care of these. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik@linux.vnet.ibm.com