Open jorti opened 5 years ago
Hi @jorti Plase can you share methods vsanapiutils.GetLatestVmodlVersion, vsanapiutils.GetVsanVcMos & getClusterInstance?
apiVersion = 'vsan.version.version7'
vcMos = <type 'dict'>: {'vsan-upgrade-systemex': 'vim.VsanUpgradeSystemEx:vsan-upgrade-systemex', 'vsan-performance-manager': 'vim.cluster.VsanPerformanceManager:vsan-performance-manager', 'vsan-mass-collector': 'vim.VsanMassCollector:vsan-mass-collector', 'vsan-cluster-config-system': 'vim.cluster.VsanVcClusterConfigSystem:vsan-cluster-config-system', 'vsan-cluster-object-system': 'vim.cluster.VsanObjectSystem:vsan-cluster-object-system', 'vsan-vds-system': 'vim.vsan.VsanVdsSystem:vsan-vds-system', 'vsan-vum-system': 'vim.cluster.VsanVumSystem:vsan-vum-system', 'vsan-vc-capability-system': 'vim.cluster.VsanCapabilitySystem:vsan-vc-capability-system', 'vsan-disk-management-system': 'vim.cluster.VsanVcDiskManagementSystem:vsan-disk-management-system', 'vsan-vcsa-deployer-system': 'vim.host.VsanVcsaDeployerSystem:vsan-vcsa-deployer-system', 'vsan-stretched-cluster-system': 'vim.cluster.VsanVcStretchedClusterSystem:vsan-stretched-cluster-system', 'vsan-phonehome-system': 'vim.VsanPhoneHomeSystem:vsan-phonehome-system', 'vsan-cluster-iscsi-target-system': 'vim.cluster.VsanIscsiTargetSystem:vsan-cluster-iscsi-target-system', 'vsan-cluster-health-system': 'vim.cluster.VsanVcClusterHealthSystem:vsan-cluster-health-system', 'vsan-cluster-space-report-system': 'vim.cluster.VsanSpaceReportSystem:vsan-cluster-space-report-system'}
cluster = ClusterComputeResource: 'vim.ClusterComputeResource:domain-c113'
Hi, I don't know if this is related, but I've also run into a problem with the VSAN Health Summary too. I had a problem using v6.0 and also after upgrading to v6.7, although the details differed slightly. I was able to track it to a problem in the XML response:
<soapenv:Envelope
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n
<soapenv:Body>
<VsanQueryVcClusterHealthSummaryResponse
xmlns=\'urn:vim25\'>
<returnval>
The two issues I noticed are the \n
just before <soapenv:Body>
and the escaped single-quotes around urn:vim25
. When I manually changed the XML to use double-quotes and eliminate the \n
, everything worked fine.
Not 100% sure it's related but wanted to share this info in case it is.
Just adding this: The raw XML returned from the vcenter is valid, but has an extra newline, and is inconsistent in its quoting (double vs single). It appears the \n
and \'
are happening during parsing:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><VsanQueryVcClusterHealthSummaryResponse xmlns='urn:vsan'><... remainder of XML ...>
I get this error when querying the vSAN health summary. I'm using pyVmomi version 6.7.1.2018.12
Debugging the code I see that the response is chunked and only gets a fragment of the xml. That could be the reason of the incorrect parsing? or am I doing something wrong?
This is a fragment of the code I'm running, it fails at the line healthSummary = vhs.QueryClusterHealthSummary(...)