Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Vsphere answers to some request with binary blobs #20

Open
Plaristote opened this issue Jul 22, 2013 · 3 comments
Open

Vsphere answers to some request with binary blobs #20

Plaristote opened this issue Jul 22, 2013 · 3 comments

Comments

@Plaristote
Copy link

Greetings !

I have a little issue with rbvmomi.
It might actually come from the vsphere provider for all I know, but it turns out that some specific request, regardless of the context in which they're made, get answered with binary blobs.

I slightly modified trivial_soap.rb to output the response.body.
It usually contains XML, as is expected, but when I am trying to get the config attribute of a VirtualMachine managed object, it only contains unreadable data.

These are the headers from the failing requests:

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <RetrieveProperties xmlns="urn:vim25">
      <_this type="PropertyCollector">propertyCollector</_this>
      <specSet xsi:type="PropertyFilterSpec">
        <propSet xsi:type="PropertySpec">
          <type>VirtualMachine</type>
          <pathSet>config</pathSet>
        </propSet>
        <objectSet xsi:type="ObjectSpec">
          <obj type="VirtualMachine">vm-447</obj>
        </objectSet>
      </specSet>
    </RetrieveProperties>
  </env:Body>
</env:Envelope>

I wonder why is this happening to me ?

I also wonder if it would be a good idea to add a check after all requests to check whether the vsphere sdk answer is intact ? That would allow to raise a more explicit exception (right now it's just Nokogiri freaking out because he can't find soapenv:Body in the response).

@toobulkeh
Copy link

@Plaristote,
What is the request you're formulating to the server?

I have not had this happen to me, but I am only using read functions in the API.

@Plaristote
Copy link
Author

Well I first noticed the issue when asking for VIM::VirtualMachine#config.
Moments ago I just tried to use inventory_flat and inventory_tree from the VIM::Folder class, and it turns out that it also triggers the same issue.

@klochto
Copy link

klochto commented Jan 14, 2016

Hi

i turn into the same issue

urn:vim25/5.5
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">env:Body<_this type="PropertyCollector">propertyCollector</_this>DatacenternameFoldernameparentVirtualMachinenameparentresourcePoolguest.ipAddresssummary.config.instanceUuidsummary.config.numCpuconfig.extraConfigconfig.flags.snapshotDisabledconfig.flags.snapshotLockedconfig.annotationconfig.guestFullNameconfig.flags.snapshotPowerOffBehaviorconfig.cpuAffinityconfig.memoryAffinitysummary.config.memorySizeMBsummary.config.templatesummary.config.memoryReservationsummary.config.cpuReservationsummary.config.numEthernetCardssummary.runtime.powerStatesummary.runtime.toolsInstallerMountedsummary.config.uuidsummary.config.instanceUuidsummary.guest.hostNameruntime.powerStateruntime.hostResourcePoolnameparentClusterComputeResourcenameparentconfigurationExdatacenter-610VisitVMsFolderVirtualMachineparent0VisitFolderParentsVisitFolderParentsFolderparent0VisitFolderParentsdatacenter-610VisitVMsDatacentervmFolder0VisitFoldersVisitFoldersFolderchildEntity0VisitFoldersVisitVMsResourcePoolsVisitResourcePoolParentsVisitResourcePoolCCRsVisitVMsResourcePoolsVirtualMachineresourcePool0VisitVMsResourcePoolsVisitResourcePoolParentsVisitResourcePoolCCRsVisitResourcePoolParentsResourcePoolparent0VisitResourcePoolParentsVisitResourcePoolCCRsVisitResourcePoolCCRsClusterComputeResourceparent0VisitResourcePoolParentsVisitResourcePoolCCRs/env:Body/env:Envelope

-> return binary blob and exception

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants