[Libvirt-cim] [PATCH 3 of 4] [TEST] 07 - Remove cleanup_guest_netpool() def and call it from vsmigration.py

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Wed Jul 1 14:39:05 UTC 2009


The changes for the patch looks fine except when we run the 
07_remote_offline_migration.py tc we get an message in the cimtest.log 
like below:

Wed, 01 Jul 2009 07:31:07:TEST LOG:INFO - Failed to undefine the 
migrated domain 'VM_frm_elm3b25.beaverton.ibm.com' on 'localhost'

This is beacuse here in the tc we only define the VM but when we call 
cleanup_guest_netpool() we destroy and undefine() the VM.

Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1242946256 25200
> # Node ID e21a60339e4be98d049db5ea146377e90a1f006b
> # Parent  fdb53fac065cd041292fbc9b6dc0dcd712b99b0b
> [TEST] 07 - Remove cleanup_guest_netpool() def and call it from vsmigration.py
>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> diff -r fdb53fac065c -r e21a60339e4b suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py	Thu May 21 15:50:56 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py	Thu May 21 15:50:56 2009 -0700
> @@ -35,9 +35,9 @@
>  from XenKvmLib.const import do_main, default_network_name
>  from CimTest.ReturnCodes import PASS, FAIL
>  from XenKvmLib.classes import get_typed_class
> -from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate
> -from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\
> -                                  destroy_netpool
> +from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate, \
> +                                   cleanup_guest_netpool
> +from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf
>
>  sup_types = ['KVM', 'Xen']
>
> @@ -60,35 +60,6 @@
>
>      return PASS, cxml
>
> -def cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname):
> -    # Clean the domain on target machine.
> -    # This is req when migration is successful, also when migration is not
> -    # completely successful VM might be created on the target machine 
> -    # and hence need to clean.
> -    target_list = domain_list(t_sysname, virt)
> -    if target_list  != None and test_dom in target_list:
> -        ret_value = cxml.undefine(t_sysname)
> -        if not ret_value:
> -            logger.info("Failed to undefine the migrated domain '%s' on '%s'",
> -                         test_dom, t_sysname)
> -
> -    # clean the networkpool created on the remote machine
> -    target_net_list = net_list(t_sysname, virt)
> -    if target_net_list != None and default_network_name in target_net_list:
> -        ret_value = destroy_netpool(t_sysname, virt, default_network_name)
> -        if ret_value != PASS:
> -            logger.info("Unable to destroy networkpool '%s' on '%s'",
> -                         default_network_name, t_sysname)
> -
> -    # Remote Migration not Successful, clean the domain on src machine
> -    src_list = domain_list(s_sysname, virt)
> -    if src_list != None and test_dom in src_list:
> -        ret_value = cxml.undefine(s_sysname)
> -        if not ret_value:
> -            logger.info("Failed to undefine the domain '%s' on source '%s'",
> -                         test_dom, s_sysname)
> -
> -
>  @do_main(sup_types)
>  def main():
>      options = main.options
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   

-- 
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list