vmware-archive/rbvmomi

Timeout on the Second try

jjasghar opened this issue · 2 comments

https://github.com/vmware/rbvmomi/blob/2e427817735e5df0aef1baa07bc95762e45a18bc/lib/rbvmomi/vim/ManagedObject.rb#L18-L25

It looks like the second time that the line 23

12: def wait_until *pathSet, &b
    13:   all = pathSet.empty?
    14:   filter = _connection.propertyCollector.CreateFilter :spec => {
    15:     :propSet => [{ :type => self.class.wsdl_name, :all => all, :pathSet => pathSet }],
    16:     :objectSet => [{ :obj => self }],
    17:   }, :partialUpdates => false
    18:   ver = ''
    19:   loop do
    20:     puts "start " + info.state
    21:     result = _connection.propertyCollector.WaitForUpdatesEx(:version => ver)
 => 22:     require 'pry' ; binding.pry
    23:     ver = result.version
    24:     puts "middle " + info.state
    25:     if x = b.call
    26:       return x
    27:     end
    28:     puts "bottom " + info.state
    29:   end
    30: ensure
    31:   filter.DestroyPropertyFilter if filter
    32: end

Gets ran, it times out. It seems that this loop is broken and never responds. @jrgarcia and I zoomed about this and it seems that it doesn't do what is supposed to with the newest versions of the 6.5 vCenter. Version 6.5.0 Build 7119070

It turns out this was environmental. It's amazing what happens when you have two NICs and no routes to one of them. :(

Well, I enjoyed the chat about the issue anyway. Thanks for bringing that code to my attention because it should probably be refactored anyway!