after update to 1.8.1: unknown VMODL type AnyType #31
Comments
Thanks for the report. Can you tell me what kind of object you are retrieving so I can more easily reproduce this? |
I get the from OSX Mavericks or Ubuntu 12.04 connecting to vCenter 5.5 just doing an 'ls' in a vCenter object: 0 /
If I downgrade to rbvmomi1.6.0 and rvc 1.7.0 everything works as expected. |
In this particular case I retrieve ClusterComputeResource objects, but faced same issue with virtual machine objects as well. Here is full code: folder_traversal_spec = RbVmomi::VIM.TraversalSpec(
:name => 'tsFolder',
:type => 'Folder',
:path => 'childEntity',
:skip => false,
:selectSet => [
RbVmomi::VIM.SelectionSpec(:name => 'tsFolder'),
RbVmomi::VIM.SelectionSpec(:name => 'tsDatacenterHostFolder'),
RbVmomi::VIM.SelectionSpec(:name => 'tsClusterHost')
]
)
datacenter_cluster_traversal_spec = RbVmomi::VIM.TraversalSpec(
:name => 'tsClusterHost',
:type => 'ClusterComputeResource',
:path => 'host',
:skip => false,
:selectSet => []
)
datacenter_folder_traversal_spec = RbVmomi::VIM.TraversalSpec(
:name => 'tsDatacenterHostFolder',
:type => 'Datacenter',
:path => 'hostFolder',
:skip => false,
:selectSet => [
RbVmomi::VIM.SelectionSpec(:name => 'tsFolder')
]
)
obj_spec = RbVmomi::VIM.ObjectSpec(
:obj => connection.rootFolder,
:skip => false,
:selectSet =>
[
folder_traversal_spec,
datacenter_folder_traversal_spec,
datacenter_cluster_traversal_spec
]
)
property_specs = [
{ :type => 'Folder', :pathSet => ['name', 'parent'] },
{ :type => 'ClusterComputeResource', :pathSet => ['name', 'parent'] }
]
filter_spec = RbVmomi::VIM.PropertyFilterSpec(:propSet => property_specs, :objectSet => [obj_spec])
result = connection.propertyCollector.RetrieveProperties(:specSet => [filter_spec]) |
I tried your code and can't reproduce this. With 1.8 I switched the deserializer over to a new one, which existed for a long time but for some reason was never the default in external rbvmomi releases. Could you open deserialize.rb and in line 45 at the beginning of deserialize() add: Btw, are you both using ruby 1.8? I notice this "/usr/lib/ruby/1.8/monitor.rb" in the backtrace. |
I tried out ruby 1.8.7 and still didn't hit this with your sample code. |
I'm also getting this same issue with 1.8.
The call that enters rbvmomi is |
Could you open deserialize.rb and in line 45 at the beginning of deserialize() add: I have spent multiple hours trying to reproduce this and can't. I don't know whats different about my environment. |
Can you paste the entire output, including the error? Maybe use pastebin :) |
I rescued the error in deserialization.rb and opened up a pry session: https://gist.github.com/subwindow/8100461 Let me know if you want to dig around in anything else. |
Thanks for digging into. Yes, I use ruby 1.8. Nokogiri is 1.5.11. Here is output with modified deserialize: |
I looked at the output from subwindow: Weird! The method starts with: So based on the output, I would have expected node['type'] to be set to "ServiceContent". But instead, it appears to be nil, so anyType is not overwritten with anything and hence the issue later down in the method. Can you confirm that? |
Yes, |
Whats your nokogiri version? Mine is: |
1.6.1, which is the latest. |
We found it! Nokogiri 1.6.1 broke it! I just upgraded to it and now I am able to reproduce. Thanks for the help. Now I am sure I will be able to fix it. |
nokogiri 1.5.10 has the same issue |
Nokogori > 1.5.5 breaks rbvmomi 1.8.1 |
Is there going to be a code fix? At the very least a temporary change should be made to the gem specification mandate a compatible version of nokogiri. |
Is there a reason this is closed? This issue is still happening and is currently a major pain. |
You can work around it by specifying a compatible version of nokogiri in your Gemfile. There really needs to be a code fix in rbvmomi though. |
Could this issue be re-opened at least please? |
Nokogori 1.5.5 is not compatible with Ruby 2.0, so the workaround is not acceptable. |
I'm having the same problem and cannot find a way around it. rbvmomi is used by a vagrant plugin vagrant-vsphere (https://github.com/nsidc/vagrant-vsphere) and this plugin requires nokogiri 1.5.10 (doco says it forces use of 1.5.10). Vagrant uses Ruby 2.0. I'm surprised this is closed without a workable solution. Any suggestions of how to work around this would be welcome. |
I installed Nokogori 1.5.1 and removed all other versions. Then uninstalled and re-installed rbvmomi and the error goes away. |
@bwallis42 @jeremythehunt @mkuzmin |
That did the trick for me. I made the modification to deserialization.rb in my installed gem (in vagrant's gem directory) and now the vagrant-vsphere plugin is working. Thanks very much for that! |
No worries mate, let me know if you run into any troubles, possibly over at https://github.com/dekz/rbvmomi |
- Syntax fixes - Added dependency on nokogiri 1.5.5 to avoid issue with rbvmomi (vmware-archive/rbvmomi#31)
Is there any chance that this will be fixed, rather than just pinning to an old version? |
@aramprice I think #32 resolves this issue, though there's no release yet. |
@domcleal - great news, thanks! |
This is because there appears to be a bug with the latest version of nokogiri in rbvmomi see here for more details: vmware-archive/rbvmomi#31
It happens while deserializing RetrieveProperties response
The text was updated successfully, but these errors were encountered: