[PATCH 0 of 4] (#2) Fix up handling of NetRASD-related define path

This is the updated version of the previous set, but with some of the less-related pieces stripped out. The default network pool is assumed, and an error is thrown if the MAC is omitted.

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1208191947 25200 # Node ID cd5c245ad76e4b397f13fc9f4eab540d071921a5 # Parent 327cfc9f69191f5a2f0454290c8ecf02e223d4dd Make NetRASD expose its MAC in the Address field Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 327cfc9f6919 -r cd5c245ad76e src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Apr 14 09:44:04 2008 -0700 +++ b/src/Virt_RASD.c Mon Apr 14 09:52:27 2008 -0700 @@ -157,6 +157,10 @@ static CMPIInstance *rasd_from_vdev(cons "NetworkType", (CMPIValue *)dev->dev.net.type, CMPI_chars); + CMSetProperty(inst, + "Address", + (CMPIValue *)dev->dev.net.mac, + CMPI_chars); } else if (dev->type == CIM_RES_TYPE_MEM) { const char *units = "KiloBytes";

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1208191947 25200 # Node ID 49dd281a34132f2ac3d57efb967fafffb9de14e6 # Parent cd5c245ad76e4b397f13fc9f4eab540d071921a5 Make VSMS::DefineSystem() throw some error messages up the stack on failure Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r cd5c245ad76e -r 49dd281a3413 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Apr 14 09:52:27 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Apr 14 09:52:27 2008 -0700 @@ -199,17 +199,17 @@ static int vssd_to_domain(CMPIInstance * return ret; } -static int xen_net_rasd_to_vdev(CMPIInstance *inst, - struct virt_device *dev) +static const char *xen_net_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) { free(dev->dev.net.type); dev->dev.net.type = strdup("bridge"); - return 1; -} - -static int kvm_net_rasd_to_vdev(CMPIInstance *inst, - struct virt_device *dev) + return NULL; +} + +static const char *kvm_net_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) { free(dev->dev.net.type); dev->dev.net.type = strdup("network"); @@ -217,11 +217,11 @@ static int kvm_net_rasd_to_vdev(CMPIInst free(dev->dev.net.source); dev->dev.net.source = strdup("default"); - return 1; -} - -static int rasd_to_vdev(CMPIInstance *inst, - struct virt_device *dev) + return NULL; +} + +static const char *rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) { uint16_t type; const char *id = NULL; @@ -229,6 +229,7 @@ static int rasd_to_vdev(CMPIInstance *in char *name = NULL; char *devid = NULL; CMPIObjectPath *op; + const char *msg = NULL; op = CMGetObjectPath(inst, NULL); if (op == NULL) @@ -260,12 +261,11 @@ static int rasd_to_vdev(CMPIInstance *in dev->dev.net.mac = devid; if (STARTS_WITH(CLASSNAME(op), "Xen")) - xen_net_rasd_to_vdev(inst, dev); + msg = xen_net_rasd_to_vdev(inst, dev); else if (STARTS_WITH(CLASSNAME(op), "KVM")) - kvm_net_rasd_to_vdev(inst, dev); + msg = kvm_net_rasd_to_vdev(inst, dev); else - CU_DEBUG("Unknown class type for net device: %s", - CLASSNAME(op)); + msg = "Invalid domain type"; } else if (type == CIM_RES_TYPE_MEM) { cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); @@ -278,16 +278,16 @@ static int rasd_to_vdev(CMPIInstance *in free(name); - return 1; + return msg; err: free(name); free(devid); - return 0; -} - -static int classify_resources(CMPIArray *resources, - struct domain *domain) + return msg; +} + +static const char *classify_resources(CMPIArray *resources, + struct domain *domain) { int i; uint16_t type; @@ -298,7 +298,7 @@ static int classify_resources(CMPIArray count = CMGetArrayCount(resources, NULL); if (count < 1) - return 0; + return "No resources specified"; domain->dev_disk = calloc(count, sizeof(struct virt_device)); domain->dev_vcpu = calloc(count, sizeof(struct virt_device)); @@ -308,34 +308,39 @@ static int classify_resources(CMPIArray for (i = 0; i < count; i++) { CMPIObjectPath *op; CMPIData item; + const char *msg = NULL; item = CMGetArrayElementAt(resources, i, NULL); if (CMIsNullObject(item.value.inst)) - return 0; + return "Internal array error"; op = CMGetObjectPath(item.value.inst, NULL); if (op == NULL) - return 0; + return "Unknown resource instance type"; if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) - return 0; + return "Unable to determine resource type"; if (type == CIM_RES_TYPE_PROC) - rasd_to_vdev(item.value.inst, - &domain->dev_vcpu[domain->dev_vcpu_ct++]); + msg = rasd_to_vdev(item.value.inst, + &domain->dev_vcpu[domain->dev_vcpu_ct++]); else if (type == CIM_RES_TYPE_MEM) - rasd_to_vdev(item.value.inst, - &domain->dev_mem[domain->dev_mem_ct++]); + msg = rasd_to_vdev(item.value.inst, + &domain->dev_mem[domain->dev_mem_ct++]); else if (type == CIM_RES_TYPE_DISK) - rasd_to_vdev(item.value.inst, - &domain->dev_disk[domain->dev_disk_ct++]); + msg = rasd_to_vdev(item.value.inst, + &domain->dev_disk[domain->dev_disk_ct++]); else if (type == CIM_RES_TYPE_NET) - rasd_to_vdev(item.value.inst, - &domain->dev_net[domain->dev_net_ct++]); - } - - return 1; + msg = rasd_to_vdev(item.value.inst, + &domain->dev_net[domain->dev_net_ct++]); + + if (msg != NULL) + return msg; + + } + + return NULL; } static CMPIInstance *connect_and_create(char *xml, @@ -385,6 +390,7 @@ static CMPIInstance *create_system(CMPII { CMPIInstance *inst = NULL; char *xml = NULL; + const char *msg = NULL; struct domain *domain; @@ -396,8 +402,9 @@ static CMPIInstance *create_system(CMPII goto out; } - if (!classify_resources(resources, domain)) { - CU_DEBUG("Failed to classify resources"); + msg = classify_resources(resources, domain); + if (msg != NULL) { + CU_DEBUG("Failed to classify resources: %s", msg); cu_statusf(_BROKER, s, CMPI_RC_ERR_FAILED, "ResourceSettings Error");

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1208191947 25200 # Node ID e5d09c60a54e8b4b60a8c46d3b1e8e3c4048252f # Parent 49dd281a34132f2ac3d57efb967fafffb9de14e6 Make DevicePool handle missing network Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 49dd281a3413 -r e5d09c60a54e src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Mon Apr 14 09:52:27 2008 -0700 +++ b/src/Virt_DevicePool.c Mon Apr 14 09:52:27 2008 -0700 @@ -673,6 +673,16 @@ static CMPIStatus _netpool_for_network(s refcn, "NetworkPool", ns); + if (inst == NULL) { + CMPIStatus s; + + CU_DEBUG("Unable to get instance: %s:%s_NetworkPool", + ns, refcn); + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Error getting pool instance"); + return s; + } if (asprintf(&str, "NetworkPool/%s", netname) == -1) return (CMPIStatus){CMPI_RC_ERR_FAILED, NULL};

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1208192047 25200 # Node ID 38627ba5e177c03bef62abd13bc3a8b0b2938870 # Parent e5d09c60a54e8b4b60a8c46d3b1e8e3c4048252f Make VSMS not parse the InstanceID of a RASD, but rather use the proper fields For Network, grab the Address for the MAC and then also try to extract the PoolID for the network name. I left it split between KVM and Xen, because I think as we expand the supported network types, we'll still need to differentiate in the code. This means that we no longer examine the InstanceID of the incoming RASDs for a DefineSystem operation (which is correct). The test suite will need to change to use these values correctly instead of generating the InstanceID and should also have a test that verifies that the InstanceID is not honored. I think that the InstanceID should be ignored if specified, although discussion of this point is certainly welcomed. Changes: - Use exposed defaults for network pool (but not the MAC) - Set the namespace on the instance of the RASD we got from the parser, so that it's a usable reference for namespace, etc. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r e5d09c60a54e -r 38627ba5e177 src/Makefile.am --- a/src/Makefile.am Mon Apr 14 09:52:27 2008 -0700 +++ b/src/Makefile.am Mon Apr 14 09:54:07 2008 -0700 @@ -75,9 +75,9 @@ libVirt_ComputerSystemMigrationIndicatio libVirt_ComputerSystemMigrationIndication_la_SOURCES = Virt_ComputerSystemMigrationIndication.c libVirt_ComputerSystemMigrationIndication_la_LIBADD = -lVirt_ComputerSystem -libVirt_VirtualSystemManagementService_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ComputerSystemIndication.la libVirt_RASD.la libVirt_HostSystem.la +libVirt_VirtualSystemManagementService_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ComputerSystemIndication.la libVirt_RASD.la libVirt_HostSystem.la libVirt_DevicePool.la libVirt_VirtualSystemManagementService_la_SOURCES = Virt_VirtualSystemManagementService.c -libVirt_VirtualSystemManagementService_la_LIBADD = -lVirt_ComputerSystem -lVirt_ComputerSystemIndication -lVirt_RASD -lVirt_HostSystem +libVirt_VirtualSystemManagementService_la_LIBADD = -lVirt_ComputerSystem -lVirt_ComputerSystemIndication -lVirt_RASD -lVirt_HostSystem -lVirt_DevicePool libVirt_VirtualSystemManagementCapabilities_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_VirtualSystemManagementCapabilities_la_SOURCES = Virt_VirtualSystemManagementCapabilities.c diff -r e5d09c60a54e -r 38627ba5e177 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Apr 14 09:52:27 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Apr 14 09:54:07 2008 -0700 @@ -47,6 +47,7 @@ #include "Virt_ComputerSystemIndication.h" #include "Virt_RASD.h" #include "Virt_HostSystem.h" +#include "Virt_DevicePool.h" #include "svpc_types.h" const static CMPIBroker *_BROKER; @@ -199,11 +200,50 @@ static int vssd_to_domain(CMPIInstance * return ret; } +static const char *_default_network(CMPIInstance *inst) +{ + CMPIInstance *pool; + CMPIObjectPath *op; + CMPIStatus s; + const char *poolid = NULL; + + op = CMGetObjectPath(inst, &s); + if ((op == NULL) || (s.rc != CMPI_RC_OK)) { + CU_DEBUG("Failed to get path for instance: %s", + CMGetCharPtr(s.msg)); + return NULL; + } + + pool = default_device_pool(_BROKER, op, CIM_RES_TYPE_NET, &s); + if ((pool == NULL) || (s.rc != CMPI_RC_OK)) { + CU_DEBUG("Failed to get default network pool: %s", + CMGetCharPtr(s.msg)); + return NULL; + } + + if (cu_get_str_prop(pool, "InstanceID", &poolid) != CMPI_RC_OK) { + CU_DEBUG("Unable to get pool's InstanceID"); + } + + return poolid; +} + static const char *xen_net_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev) { + const char *val = NULL; + free(dev->dev.net.type); - dev->dev.net.type = strdup("bridge"); + dev->dev.net.type = strdup("network"); + + if (cu_get_str_prop(inst, "PoolID", &val) != CMPI_RC_OK) + val = _default_network(inst); + + if (val == NULL) + return 0; + + free(dev->dev.net.source); + dev->dev.net.source = name_from_pool_id(val); return NULL; } @@ -211,11 +251,88 @@ static const char *kvm_net_rasd_to_vdev( static const char *kvm_net_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev) { + const char *val = NULL; + free(dev->dev.net.type); dev->dev.net.type = strdup("network"); + if (cu_get_str_prop(inst, "PoolID", &val) != CMPI_RC_OK) + val = _default_network(inst); + + if (val == NULL) + return "No NetworkPool specified and no default available"; + free(dev->dev.net.source); - dev->dev.net.source = strdup("default"); + dev->dev.net.source = name_from_pool_id(val); + + return NULL; +} + +static const char *net_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + const char *val = NULL; + CMPIObjectPath *op; + const char *msg = NULL; + + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) { + msg = "Required field `Address' missing from NetRASD"; + goto out; + } + + free(dev->dev.net.mac); + dev->dev.net.mac = strdup(val); + + op = CMGetObjectPath(inst, NULL); + if (op == NULL) { + CU_DEBUG("Unable to get instance path"); + goto out; + } + + if (STARTS_WITH(CLASSNAME(op), "Xen")) + msg = xen_net_rasd_to_vdev(inst, dev); + else if (STARTS_WITH(CLASSNAME(op), "KVM")) + msg = kvm_net_rasd_to_vdev(inst, dev); + else { + msg = "Unknown class type for net device"; + CU_DEBUG("Unknown class type for net device: %s", + CLASSNAME(op)); + } + + out: + return msg; +} + +static const char *disk_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + const char *val = NULL; + + if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK) + val = "hda"; + + free(dev->dev.disk.virtual_dev); + dev->dev.disk.virtual_dev = strdup(val); + + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) + val = "/dev/null"; + + free(dev->dev.disk.source); + dev->dev.disk.source = strdup(val); + dev->dev.disk.disk_type = disk_type_from_file(val); + + return NULL; +} + +static const char *mem_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); + cu_get_u64_prop(inst, "Reservation", &dev->dev.mem.size); + dev->dev.mem.maxsize = dev->dev.mem.size; + cu_get_u64_prop(inst, "Limit", &dev->dev.mem.maxsize); + dev->dev.mem.size <<= 10; + dev->dev.mem.maxsize <<= 10; return NULL; } @@ -224,69 +341,38 @@ static const char *rasd_to_vdev(CMPIInst struct virt_device *dev) { uint16_t type; - const char *id = NULL; - const char *val = NULL; - char *name = NULL; - char *devid = NULL; CMPIObjectPath *op; const char *msg = NULL; op = CMGetObjectPath(inst, NULL); - if (op == NULL) - goto err; - - if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) - goto err; + if (op == NULL) { + msg = "Unable to get path for device instance"; + goto out; + } + + if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) { + msg = "Unable to get device type"; + goto out; + } dev->type = (int)type; - if (cu_get_str_prop(inst, "InstanceID", &id) != CMPI_RC_OK) - goto err; - - if (!parse_fq_devid(id, &name, &devid)) - goto err; - if (type == CIM_RES_TYPE_DISK) { - free(dev->dev.disk.virtual_dev); - dev->dev.disk.virtual_dev = devid; - - if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) - val = "/dev/null"; - - free(dev->dev.disk.source); - dev->dev.disk.source = strdup(val); - dev->dev.disk.disk_type = disk_type_from_file(val); + msg = disk_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_NET) { - free(dev->dev.net.mac); - dev->dev.net.mac = devid; - - if (STARTS_WITH(CLASSNAME(op), "Xen")) - msg = xen_net_rasd_to_vdev(inst, dev); - else if (STARTS_WITH(CLASSNAME(op), "KVM")) - msg = kvm_net_rasd_to_vdev(inst, dev); - else - msg = "Invalid domain type"; - + msg = net_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_MEM) { - cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); - cu_get_u64_prop(inst, "Reservation", &dev->dev.mem.size); - dev->dev.mem.maxsize = dev->dev.mem.size; - cu_get_u64_prop(inst, "Limit", &dev->dev.mem.maxsize); - dev->dev.mem.size <<= 10; - dev->dev.mem.maxsize <<= 10; - } - - free(name); + msg = mem_rasd_to_vdev(inst, dev); + } + out: + if (msg) + CU_DEBUG("rasd_to_vdev(): %s", msg); return msg; - err: - free(name); - free(devid); - - return msg; } static const char *classify_resources(CMPIArray *resources, + const char *ns, struct domain *domain) { int i; @@ -308,31 +394,37 @@ static const char *classify_resources(CM for (i = 0; i < count; i++) { CMPIObjectPath *op; CMPIData item; + CMPIInstance *inst; const char *msg = NULL; item = CMGetArrayElementAt(resources, i, NULL); if (CMIsNullObject(item.value.inst)) return "Internal array error"; - op = CMGetObjectPath(item.value.inst, NULL); + inst = item.value.inst; + + op = CMGetObjectPath(inst, NULL); if (op == NULL) return "Unknown resource instance type"; + + CMSetNameSpace(op, ns); + CMSetObjectPath(inst, op); if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) return "Unable to determine resource type"; if (type == CIM_RES_TYPE_PROC) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_vcpu[domain->dev_vcpu_ct++]); else if (type == CIM_RES_TYPE_MEM) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_mem[domain->dev_mem_ct++]); else if (type == CIM_RES_TYPE_DISK) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_disk[domain->dev_disk_ct++]); else if (type == CIM_RES_TYPE_NET) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_net[domain->dev_net_ct++]); if (msg != NULL) @@ -402,12 +494,12 @@ static CMPIInstance *create_system(CMPII goto out; } - msg = classify_resources(resources, domain); + msg = classify_resources(resources, NAMESPACE(ref), domain); if (msg != NULL) { CU_DEBUG("Failed to classify resources: %s", msg); cu_statusf(_BROKER, s, CMPI_RC_ERR_FAILED, - "ResourceSettings Error"); + "ResourceSettings Error: %s", msg); goto out; }

static const char *xen_net_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev) { + const char *val = NULL; + free(dev->dev.net.type); - dev->dev.net.type = strdup("bridge"); + dev->dev.net.type = strdup("network"); + + if (cu_get_str_prop(inst, "PoolID", &val) != CMPI_RC_OK) + val = _default_network(inst); + + if (val == NULL) + return 0;
This should return an error string, since the function returns a char *. I missed this in the last set, I think. I wouldn't complain though if this change came as a follow up patch so you don't have to resend the whole set. ;) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Dan Smith wrote:
- Set the namespace on the instance of the RASD we got from the parser, so that it's a usable reference for namespace, etc.
...
static const char *classify_resources(CMPIArray *resources, + const char *ns, struct domain *domain) { int i; @@ -308,31 +394,37 @@ static const char *classify_resources(CM for (i = 0; i < count; i++) { CMPIObjectPath *op; CMPIData item; + CMPIInstance *inst; const char *msg = NULL;
item = CMGetArrayElementAt(resources, i, NULL); if (CMIsNullObject(item.value.inst)) return "Internal array error";
- op = CMGetObjectPath(item.value.inst, NULL); + inst = item.value.inst; + + op = CMGetObjectPath(inst, NULL); if (op == NULL) return "Unknown resource instance type"; + + CMSetNameSpace(op, ns); + CMSetObjectPath(inst, op); This line gave me a segfault. I'm on sfcb in opensuse 10.3.
Deepti also saw a segfault. But I am not sure this is the same as hers. She is using pegasus.
if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) return "Unable to determine resource type";
if (type == CIM_RES_TYPE_PROC) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_vcpu[domain->dev_vcpu_ct++]); else if (type == CIM_RES_TYPE_MEM) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_mem[domain->dev_mem_ct++]); else if (type == CIM_RES_TYPE_DISK) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_disk[domain->dev_disk_ct++]); else if (type == CIM_RES_TYPE_NET) - msg = rasd_to_vdev(item.value.inst, + msg = rasd_to_vdev(inst, &domain->dev_net[domain->dev_net_ct++]);
if (msg != NULL)
-- - Zhengang

+ CMSetObjectPath(inst, op); ZL> This line gave me a segfault. I'm on sfcb in opensuse 10.3.
That's because sfcb's cmpimacs.h is *broken*. Instead of calling ft->setObjectPath(), they call ft->getObjectPath(). The CVS version of SFCB has the fix, which may be an option for you. Alternately you can fix your header file until the next official release. ZL> Deepti also saw a segfault. But I am not sure this is the same as ZL> hers. She is using pegasus. Okay, after posting, I started to notice an occasional crash on Pegasus that I have not yet tracked down, so I imagine it's something different. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com

Dan Smith wrote:
+ CMSetObjectPath(inst, op); ZL> This line gave me a segfault. I'm on sfcb in opensuse 10.3.
That's because sfcb's cmpimacs.h is *broken*. Instead of calling ft->setObjectPath(), they call ft->getObjectPath().
The CVS version of SFCB has the fix, which may be an option for you. Alternately you can fix your header file until the next official release. Looks like they saw your post here. And they released a new version yesterday :).
ZL> Deepti also saw a segfault. But I am not sure this is the same as ZL> hers. She is using pegasus.
Okay, after posting, I started to notice an occasional crash on Pegasus that I have not yet tracked down, so I imagine it's something different.
Thanks!
------------------------------------------------------------------------
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- - Zhengang

ZL> Looks like they saw your post here. And they released a new ZL> version yesterday :). Actually, I think Jay employed some coercion techniques on our behalf... :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com

Dan Smith wrote:
ZL> Looks like they saw your post here. And they released a new ZL> version yesterday :).
Actually, I think Jay employed some coercion techniques on our behalf... :) Yep. Jay is geographically closer to them :)
Bad news is that, with the 1.3.0 new release, I still got a SIGSEGV at the same line. I double checked sfcb's header files. The typo of setobjectpath/getobjectpath is fixed in this release. And my local pegasus headers also have the correct function there. 429 op = CMGetObjectPath(inst, NULL); 430 if (op == NULL) 431 return "Unknown resource instance type"; 432 433 CMSetNameSpace(op, ns); 434 CMSetObjectPath(inst, op); (gdb) p inst->ft->setObjectPath $6 = (CMPIStatus (*)(CMPIInstance *, const CMPIObjectPath *)) 0 (gdb) p *(inst->ft) $7 = {ftVersion = 1, release = 0xb7ee20d1 <__ift_release>, clone = 0xb7ee218f <__ift_clone>, getProperty = 0xb7ee2473 <__ift_getProperty>, getPropertyAt = 0xb7ee23e3 <__ift_getPropertyAt>, getPropertyCount = 0xb7ee2542 <__ift_getPropertyCount>, setProperty = 0xb7ee2586 <__ift_setProperty>, getObjectPath = 0xb7ee276b <__ift_getObjectPath>, setPropertyFilter = 0xb7ee2b47 <__ift_setPropertyFilter>, *setObjectPath* = 0} Why is setObjectPath a null pointer?
------------------------------------------------------------------------
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- - Zhengang

ZL> Why is setObjectPath a null pointer? Good question. When I changed the macro on the older version of sfcb, it worked just fine. Perhaps there is another regression involved... -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (3)
-
Dan Smith
-
Kaitlin Rupert
-
Zhengang Li