[libvirt] ESX: failure while performing "CastFromAnyType"

Ata E Husain Bohra ata.husain at hotmail.com
Mon Jul 16 22:03:54 UTC 2012


Hi All, 

I am trying to extend “iscsi” support for iSCSI driver, currently am stuck at getting iSCSI target list from the hypervisor. I am using hostSystem object (propertyNameList is set to “config.storageDevice.hostBusAdapter”) to retrieve list of “HostHostBusAdapter” from ESX, but the call fails to perform “CastFromAnyType”  from ObjectContent –> HostHostBusAdapter. The esx_vi_generator.input object definition looks like this:

object HostHostBusAdapter
    String                                   key                            o    
    String                                   device                         r    
    Int                                      bus                            r    
    String                                   status                         r    
    String                                   model                          r    
    String                                   driver                         o    
    String                                   pci                            o    
end

esx_vi_generaor.py is modified as follows:

"HostHostBusAdapter"         : Object.FEATURE__ANY_TYPE |
                               Object.FEATURE__LIST,

Using gdb, I see the failure occurs at: esx/esx_vi.c:esxVI_List_CastFromAnyType(..) line 1631:

..
if (esxVI_AnyType_Deserialize(childNode, &childAnyType) < 0 || 
    castFromAnyTypeFunc(childAnyType, &item) < 0 || 
    esxVI_List_Append(list, item) < 0) { 
    goto cleanup;
}
..

In one of my earlier patches (subject: Add routines to interface driver) I patched esx_vi_generator.py to deserialize “string list”; as the patch is still under review I manually applied the branch to this branch but no change (did not expect change as structure does not contain any list object). I am wondering what else is missing to make it work.

Any suggestion how to debug/fix this issue is highly appreciated.

Thanks!
Ata
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120716/cf17160e/attachment-0001.htm>


More information about the libvir-list mailing list