[PATCH] (#2) MigrationJob will write a migration mark to the infostore of the guest migrating
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1250173906 10800
# Node ID fc6b58380e5f04b09514bdfe8aef54ed0a013e42
# Parent 20528f913ec18441bf1ef2f812d110580fa01015
(#2) MigrationJob will write a migration mark to the infostore of the guest migrating
This allows ComputerSystem to know when its respective guest is being migrated
#2:
Fixed patch submission date
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 20528f913ec1 -r fc6b58380e5f src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Tue Jun 16 14:25:50 2009 -0700
+++ b/src/Virt_VSMigrationService.c Thu Aug 13 11:31:46 2009 -0300
@@ -48,6 +48,7 @@
#include "Virt_ComputerSystem.h"
#include "Virt_VSMigrationSettingData.h"
#include "svpc_types.h"
+#include "libxkutil/infostore.h"
#include "config.h"
@@ -1135,6 +1136,24 @@
return s;
}
+static void clear_infstore_migration_mark(virDomainPtr dom)
+{
+ struct infostore_ctx *infp;
+ bool ret = false;
+
+ infp = infostore_open(dom);
+ if (infp == NULL) {
+ CU_DEBUG("Unable to open domain information store."
+ "Migration mark won't be cleared");
+ return;
+ }
+
+ ret = infostore_set_bool(infp, "migrating", false);
+ CU_DEBUG("Clearing infostore migrating flag");
+
+ infostore_close(infp);
+}
+
static CMPIStatus migrate_vs(struct migration_job *job)
{
CMPIStatus s;
@@ -1210,6 +1229,7 @@
CMGetCharPtr(s.msg));
}
out:
+ clear_infstore_migration_mark(dom);
raise_deleted_ind(job);
free(uri);
@@ -1251,6 +1271,45 @@
return NULL;
}
+static bool set_infstore_migration_mark(const CMPIObjectPath *ref,
+ const char *domain)
+{
+ struct infostore_ctx *infp;
+ bool ret = false;
+ CMPIStatus s;
+ virConnectPtr conn = NULL;
+ virDomainPtr dom = NULL;
+
+ conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
+ if (conn == NULL)
+ goto out;
+
+ dom = virDomainLookupByName(conn, domain);
+ if (dom == NULL) {
+ CU_DEBUG("No such domain");
+ goto out;
+ }
+
+
+ infp = infostore_open(dom);
+ if (infp == NULL) {
+ CU_DEBUG("Unable to open domain information store."
+ "Migration mark won't be placed");
+ goto out;
+ }
+
+ ret = infostore_set_bool(infp, "migrating", true);
+ CU_DEBUG("Migration mark set");
+
+ infostore_close(infp);
+
+ out:
+ virDomainFree(dom);
+ virConnectClose(conn);
+
+ return ret;
+}
+
static CMPIInstance *_migrate_job_new_instance(const char *cn,
const char *ns)
{
@@ -1411,6 +1470,10 @@
goto out;
}
+ rc = set_infstore_migration_mark(ref, domain);
+ if (!rc)
+ CU_DEBUG("Failed to set migration mark in infostore");
+
ind = prepare_indication(_BROKER, inst, job, MIG_CREATED, &s);
rc = raise_indication(job->context, MIG_CREATED, job->ref_ns,
inst, ind);
15 years, 4 months
[PATCH] [TEST] Fixing vsms/19*py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik@linux..vnet.ibm.com>
# Date 1250160712 25200
# Node ID 8651eccf3771e09bec36329239452d58c8331843
# Parent e8bb9c334a06962f8fbc5e12d649b9f539c077f8
[TEST] Fixing vsms/19*py
Tested with KVM on F10 and Xen on RHEL5.3 with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r e8bb9c334a06 -r 8651eccf3771 suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Thu Aug 13 01:02:25 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Thu Aug 13 03:51:52 2009 -0700
@@ -68,8 +68,9 @@
'network' : "Valid param "}
}
+ libvirt_version = virsh_version(options.ip, options.virt)
+ inv_empty_network = "Network not found"
if options.virt == "Xen" or options.virt == "XenFV":
- libvirt_version = virsh_version(options.ip, options.virt)
if libvirt_version <= "0.3.3":
inv_empty_network = "no network with matching name"
@@ -78,7 +79,6 @@
"device invalid')"
else:
- inv_empty_network = "Network not found"
inv_br_str = "POST operation failed: xend_post: error from xen " + \
"daemon: (xend.err 'Device 0 (vif) could not be " + \
@@ -88,6 +88,11 @@
expected_values['empty']['network'] = inv_empty_network
expected_values['invalid']['bridge'] = inv_br_str
+ else:
+ if libvirt_version >= "0.7.0":
+ expected_values['empty']['network'] = inv_empty_network
+ expected_values['invalid']['network'] = inv_empty_network
+
tc_scen = {
'invalid' : 'invalid',
@@ -107,6 +112,7 @@
status = PASS
for nettype in nettypes:
for tc, field in tc_scen.iteritems():
+ logger.error("DEBUG nettype is %s, field is %s, tc is %s", nettype, field, tc)
cxml = vxml.get_class(options.virt)(default_dom, mac=nmac,
ntype=nettype,
net_name=field)
diff -r e8bb9c334a06 -r 8651eccf3771 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Aug 13 01:02:25 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Aug 13 03:51:52 2009 -0700
@@ -770,11 +770,12 @@
rc = int(self.err_rc)
if rc != exp_rc:
- raise Exception("Got rc: %d, exp %d." % (rc, exp_rc))
+ raise Exception("Error code Mismatch, Got rc: %d, exp %d." \
+ % (rc, exp_rc))
- if self.err_desc.find(exp_desc) < 0:
- raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc,
- exp_desc))
+ if not exp_desc in self.err_desc:
+ raise Exception("Desc Mismatch, Got desc: '%s', exp '%s'" \
+ % (self.err_desc, exp_desc))
except Exception, details:
logger.error(details)
15 years, 4 months
[PATCH] [TEST] Updating VSMS/13*py to align with the Vdev changes
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik@linux..vnet.ibm.com>
# Date 1250150545 25200
# Node ID e8bb9c334a06962f8fbc5e12d649b9f539c077f8
# Parent 090c55ea601c4ef759475bf1d0b64eae9c8f33b8
[TEST] Updating VSMS/13*py to align with the Vdev changes.
Tested with KVM on F10 and Xen on RHEL5.3 with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 090c55ea601c -r e8bb9c334a06 suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Wed Aug 12 04:28:07 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Thu Aug 13 01:02:25 2009 -0700
@@ -27,7 +27,8 @@
from XenKvmLib import vsms
from VirtLib import utils
from CimTest.Globals import logger
-from XenKvmLib.const import do_main
+from XenKvmLib.const import do_main, KVM_secondary_disk_path, \
+ Xen_secondary_disk_path
from CimTest.ReturnCodes import FAIL, PASS
from XenKvmLib.test_doms import destroy_and_undefine_domain
from XenKvmLib.classes import get_typed_class
@@ -120,7 +121,15 @@
virt_xml = get_class(options.virt)
cxml = virt_xml(test_dom, mac=mac1)
- cxml2 = virt_xml(test_dom2, mac=mac2)
+ if options.virt == 'Xen':
+ test_disk = 'xvdb'
+ disk_path = Xen_secondary_disk_path
+ else:
+ test_disk = 'hdb'
+ disk_path = KVM_secondary_disk_path
+
+ cxml2 = virt_xml(test_dom2, mac=mac2,
+ disk=test_disk, disk_file_path=disk_path)
try:
rc = cxml.cim_define(options.ip)
15 years, 4 months
Re: Test Run Summary (Aug 11 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus
by Deepti B Kalakeri
Deepti B Kalakeri wrote:
>
>
> Deepti B Kalakeri wrote:
>> Due to some problem, I am not able to send mails to libvirt-cim
>> mailing list.
>>
>> =================================================
>> Test Run Summary (Aug 11 2009): Xen on Red Hat Enterprise Linux
>> Server release 5.3 (Tikanga) with Pegasus
>> =================================================
>> Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
>> Kernel: 2.6.18-128.el5xen
>> libvirt: 0.3.3
>> Hypervisor: Xen 3.1.0
>> CIMOM: Pegasus 2.7.1
>> Libvirt-cim revision: 945
>> Libvirt-cim changeset: 2de7d9bdb9af
>> Cimtest revision: Cimtest changeset:
>> =================================================
>> FAIL : 34
>> XFAIL : 3
>> SKIP : 4
>> PASS : 125
>> -----------------
>> Total : 166
>> =================================================
>> FAIL Test Summary:
>> ComputerSystemIndication - 01_created_indication.py: FAIL
>> ComputerSystemMigrationJobIndication -
>> 01_csmig_ind_for_offline_mig.py: FAIL
>> ElementAllocatedFromPool - 01_forward.py: FAIL
> This tc fails for Xen. In the test case though we are passing the
> network pool information while creating the domain.
> But, somehow the domain is getting created with the bridge type
> interface.
> I checked this with the rpm based libvirt-cim on RHEL5.4 snap5 and the
> test case worked fine.
> But the same when checked with current sources on RHEL5.4 failed with
> same error as on with RHEL5.3.
>
>
>> ElementAllocatedFromPool - 04_forward_errs.py: FAIL
>> HostSystem - 03_hs_to_settdefcap.py: FAIL
> Submitted fix for these.
>> RASD - 01_verify_rasd_fields.py: FAIL
The test case do not have any problem.
I am seeing a peculiar behavior. The EnumerateInstance operation from
the provider on the RASD is returning None value in the NetworkName field.
I commented out the destroy and undefine part of the test case and
checked if the wbemcli ein operation on RASD returned proper NetworkName
value, which did.
The rasd_from_vdev() function in Virt_RASD.c is indirectly called via
enu_rasds -> _get_rasds().
The NetworkName value seem to be assigned properly when called from the
VSSDC.c vssd_to_rasd() function.
But when called from EnumInstances() in the Virt_RASD.c the NetworkName
is getting reset to null.
Here is the sample Debug msg below:
Virt_VSSDComponent.c(60): From VSSDC
Virt_RASD.c(756): From RASD
misc_util.c(75): Connecting to libvirt with uri `xen'
device_parsing.c(325): No network source defined, leaving blank
Virt_RASD.c(444): DEBUG NetworkName uis testbridge
Virt_RASD.c(445): DEBUG dev->dev.net.type, bridge is bridge
Virt_RASD.c(446): DEBUG InstanceID is VSSDC_dom/00:11:22:33:44:aa
....
Virt_RASD.c(444): DEBUG DEEPTI NetworkName uis testbridge
Virt_RASD.c(445): DEBUG (STREQ(dev->dev.net.type, bridge is bridge
Virt_RASD.c(446): DEBUG InstanceID is VSSDC_dom/00:11:22:33:44:aa
misc_util.c(75): Connecting to libvirt with uri `xen'
infostore.c(88): Path is /etc/libvirt/cim/Xen_VSSDC_dom
misc_util.c(406): Type is Xen
libvir: Xen error : failed Xen syscall ioctl 3166208
infostore.c(88): Path is /etc/libvirt/cim/Xen_VSSDC_dom
misc_util.c(75): Connecting to libvirt with uri `xen'
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
device_parsing.c(273): Disk node: disk
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
device_parsing.c(325): No network source defined, leaving blank
Virt_RASD.c(444): DEBUG NetworkName uis (null)
Virt_RASD.c(445): DEBUG (STREQ(dev->dev.net.type, bridge is bridge
Virt_RASD.c(446): DEBUG InstanceID is VSSDC_dom/00:11:22:33:44:aa
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(75): Connecting to libvirt with uri `xen'
infostore.c(88): Path is /etc/libvirt/cim/Xen_VSSDC_dom
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(406): Type is Xen
libvir: Xen error : failed Xen syscall ioctl 3166208
infostore.c(88): Path is /etc/libvirt/cim/Xen_Domain-0
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(406): Type is Xen
libvir: Xen error : failed Xen syscall ioctl 3166208
infostore.c(88): Path is /etc/libvirt/cim/Xen_VSSDC_dom
instance_util.c(127): Number of keys: 1
instance_util.c(140): Comparing key 0: `InstanceID'
misc_util.c(75): Connecting to libvirt with uri `xen'
device_parsing.c(325): No network source defined, leaving blank
Virt_RASD.c(444): DEBUG NetworkName uis (null)
Virt_RASD.c(445): DEBUG (STREQ(dev->dev.net.type, bridge is bridge
Virt_RASD.c(446): DEBUG InstanceID is VSSDC_dom/00:11:22:33:44:aa
instance_util.c(127): Number of keys: 1
>> RASD - 02_enum.py: FAIL
Submitted fix for this.
>> ResourceAllocationFromPool - 01_forward.py: FAIL
Though the networkpool information is supplied with the Xen domain while
creating it.. once created the xml will have the bridge information
instead of pool.
Because of the provider would not have the source networkpool
information when queried, this test fails with the following error:
device_parsing.c(325): No network source defined, leaving blank
Virt_DevicePool.c(444): Unable to determine pool since no network source
defined
>> ResourceAllocationFromPool - 02_reverse.py: FAIL
same here.
>> ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
>> ResourcePoolConfigurationService - 09_DeleteDiskPool.py: FAIL
>> SettingsDefineCapabilities - 01_forward.py: FAIL
>> VSSD - 02_bootldr.py: FAIL
Submitted fix for this
>> VSSD - 03_vssd_gi_errs.py: FAIL
Passed when ran manually.
>> VSSD - 04_vssd_to_rasd.py: FAIL
Submitted fix for this.
>> VSSD - 05_set_uuid.py: FAIL
Submitted fix for this.
>> VirtualSystemManagementService - 01_definesystem_name.py: FAIL
>> VirtualSystemManagementService - 02_destroysystem.py: FAIL
>> VirtualSystemManagementService - 06_addresource.py: FAIL
Passed when run manually
>> VirtualSystemManagementService - 08_modifyresource.py: FAIL
Need to look into it
>> VirtualSystemManagementService - 09_procrasd_persist.py: FAIL
>> VirtualSystemManagementService - 12_referenced_config.py: FAIL
Passed when run manually
>> VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
The test case fails because of the duplicate vdevice info. will fix this.
>>
>> VirtualSystemManagementService - 15_mod_system_settings.py: FAIL
>> VirtualSystemManagementService - 17_removeresource_neg.py: FAIL
>> VirtualSystemManagementService - 20_verify_vnc_password.py: FAIL
All the above passed when run manually
>> VirtualSystemMigrationService - 01_migratable_host.py: FAIL
>> VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL
>> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL
>> VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL
>> VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL
>> VirtualSystemMigrationService -
>> 08_remote_restart_resume_migration.py: FAIL
>> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
>> VirtualSystemSnapshotService - 03_create_snapshot.py: FAIL
>>
> Need to verify the above.
>
The following needs to be verified.
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
ResourcePoolConfigurationService - 09_DeleteDiskPool.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
VirtualSystemManagementService - 13_refconfig_additional_devs.py:
VirtualSystemManagementService - 08_modifyresource.py: FAIL
VirtualSystemMigrationService - 01_migratable_host.py: FAIL
VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL
VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL
VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL
VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
VirtualSystemSnapshotService - 03_create_snapshot.py: FAIL
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
15 years, 4 months
[PATCH] [TEST] Fixing get_vssd_mof() to pass uuid param
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1250083990 25200
# Node ID 2c8ae164c260b0d8c8df07c4e01010daa58a5de1
# Parent 1388a57c7e40a0e51c095bab1fa93ce320433bdd
[TEST] Fixing get_vssd_mof() to pass uuid param.
This patch fixes VSSD/02_bootldr.py VSSD/05_set_uuid.py
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 1388a57c7e40 -r 2c8ae164c260 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Aug 12 05:44:59 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Aug 12 06:33:10 2009 -0700
@@ -128,9 +128,9 @@
class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
pass
-def get_vssd_mof(virt, dom_name, bldr=None):
+def get_vssd_mof(virt, dom_name, uuid=None, bldr=None):
vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData"))
- vssd = vssd_cn(dom_name, virt, bldr=bldr)
+ vssd = vssd_cn(dom_name, virt, uuid=uuid, bldr=bldr)
return vssd.mof()
# classes to define RASD parameters
diff -r 1388a57c7e40 -r 2c8ae164c260 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Aug 12 05:44:59 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Aug 12 06:33:10 2009 -0700
@@ -563,7 +563,7 @@
self.domain_name = dom_name
self.err_rc = None
self.err_desc = None
- self.vssd = vsms.get_vssd_mof(virt, dom_name, uuid)
+ self.vssd = vsms.get_vssd_mof(virt, dom_name, uuid=uuid)
self.nasd = vsms.get_nasd_class(virt)(type=net_type,
mac=net_mac,
name=dom_name,
@@ -836,7 +836,7 @@
def set_bootloader(self, ip, gtype=0):
bldr = bootloader(ip, gtype)
self.add_sub_node('/domain', 'bootloader', bldr)
- self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr)
+ self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr=bldr)
return bldr
def set_bridge(self, ip):
15 years, 4 months
[PATCH] [Test]Testcase to check for duplicate UUID
by Yogananth Subramanian
# HG changeset patch
# User anantyog(a)in.ibm.com
# Date 1249986809 25200
# Node ID 87e175898a31e7866d67349e349fad34f8d0bb01
# Parent 12fd8bac01f25251dbfb64dd5e764f533108964b
[Test]Testcase to check for duplicate UUID
Steps:
1) Define 2 domains,'default' and 'test', both with random UUID
2) Reset the uuid of the second domain, 'test', to the uuid of the
first domain, using ModifySystemSettings
3) The verify the assigned uuid
The test does not behave as expected, either at step 2 when ModifySystemSetting
is called, an error should be returned for the duplicate UUID or at step 3
when we check for the assigned UUID, it should be different from the UUID of
the first domain, neither of this happens. I have filed the bug 00016
regarding this issue.
Signed-off-by: Yogananth Subramanian <anantyog(a)linux.vnet.ibm.com>
diff -r 12fd8bac01f2 -r 87e175898a31 suites/libvirt-cim/cimtest/VSSD/06_dupicate_uuid.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/VSSD/06_dupicate_uuid.py Tue Aug 11 03:33:29 2009 -0700
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+#
+# Copyright 2009 IBM Corp.
+#
+# Authors:
+# Yogananth Subramanian <anantyog(a)linux.vnet.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#Steps:
+#1) Define 2 domains,'default' and 'test', both with random UUID
+#2) Reset the uuid of the second domain, 'test', to the uuid of the
+# first domain, using ModifySystemSettings
+#3) The verify the assigned uuid
+#
+
+import sys
+import time
+from XenKvmLib import vsms
+from XenKvmLib import vxml
+from CimTest.Globals import logger
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+from XenKvmLib.const import do_main
+from XenKvmLib.classes import get_typed_class, inst_to_mof
+from XenKvmLib.enumclass import GetInstance
+
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+default_dom = 'uuid_domain'
+test_dom = 'test_domain'
+nmac = '99:aa:bb:cc:ee:ff'
+bug_libvirt = "00016"
+
+def get_vssd(ip, virt, get_cim_inst, default_dom):
+ cn = get_typed_class(virt, "VirtualSystemSettingData")
+ inst = None
+
+ try:
+ if virt == "XenFV":
+ virt = "Xen"
+
+ key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) }
+ inst = GetInstance(ip, cn, key_list, get_cim_inst)
+
+ except Exception, details:
+ logger.error(details)
+ return FAIL, inst
+
+ if inst is None:
+ return FAIL, inst
+
+ return PASS, inst
+
+@do_main(sup_types)
+def main():
+ options = main.options
+
+ service = vsms.get_vsms_class(options.virt)(options.ip)
+
+ cxml = vxml.get_class(options.virt)(default_dom)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ logger.error("Failed to define the dom: %s", default_dom)
+ return FAIL
+
+ try:
+ status, inst = get_vssd(options.ip, options.virt, True,default_dom)
+ if status != PASS:
+ raise Exception("Failed to get the VSSD instance for %s"%
+ default_dom)
+
+ uuid = inst['UUID']
+
+ sxml = vxml.get_class(options.virt)(test_dom, uuid=uuid, mac=nmac)
+ ret = sxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Failed to define the dom: %s"% test_dom)
+
+ status, inst = get_vssd(options.ip, options.virt, True,test_dom)
+ if status != PASS:
+ raise Exception("Failed to get the VSSD instance for %s"%
+ test_dom)
+
+ inst['UUID'] = uuid
+ vssd = inst_to_mof(inst)
+ ret = service.ModifySystemSettings(SystemSettings=vssd)
+
+ if inst['UUID'] == uuid and ret[0]== 0 :
+ sxml.undefine(options.ip)
+ logger.error("The domains %s and %s have the same UUID",
+ default_dom,test_dom)
+ status = XFAIL_RC(bug_libvirt)
+
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
+
+ sxml.undefine(options.ip)
+ cxml.undefine(options.ip)
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
15 years, 4 months
[PATCH] [TEST] Fixing VSSD/02_bootldr.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1250081099 25200
# Node ID 1388a57c7e40a0e51c095bab1fa93ce320433bdd
# Parent 40ae39e74558a58a05f01fcf61aaa8ee5384e667
[TEST] Fixing VSSD/02_bootldr.py
Tested with Xen on RHEL5.3 with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 40ae39e74558 -r 1388a57c7e40 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Aug 12 04:28:07 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Aug 12 05:44:59 2009 -0700
@@ -130,7 +130,7 @@
def get_vssd_mof(virt, dom_name, bldr=None):
vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData"))
- vssd = vssd_cn(dom_name, virt, bldr)
+ vssd = vssd_cn(dom_name, virt, bldr=bldr)
return vssd.mof()
# classes to define RASD parameters
15 years, 4 months
[PATCH] [TEST] Fixing VSSD/04*py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1250076487 25200
# Node ID 40ae39e74558a58a05f01fcf61aaa8ee5384e667
# Parent ba7c3a6ecb409faad1395a19d1782fda6c525f67
[TEST] Fixing VSSD/04*py
Tested with KVM on F10 and Xen on RHEL5.3 with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ba7c3a6ecb40 -r 40ae39e74558 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Aug 12 02:30:19 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Aug 12 04:28:07 2009 -0700
@@ -73,11 +73,6 @@
else:
vsxml_info = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
mac = test_mac, disk = test_disk)
- try:
- bridge = vsxml_info.set_vbridge(server, default_network_name)
- except Exception, details:
- logger.error("Exception : %s", details)
- return FAIL, vsxml_info
try:
ret = vsxml_info.cim_define(server)
15 years, 4 months