Project

General

Profile

Actions

Bug #22798

closed

VMware: Exception listing VMs in the root of the datacenter

Added by Adam Grare about 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When listing virtual machines under a compute_resource on VMware vSphere a folder hash is built of all folders under the datacenter, but the datacenter's vmFolder is skipped in the PropertyFilterSpec.

This causes VMs which have the vmFolder as their parent to throw an undefined method '[]' for nil:NilClass error when they try to access 'folder_inventory[vm['parent']._ref][:path]'.

Traceback:
2018-03-06T11:11:34 fd0ae69d [app] [W] Error has occurred while listing VMs on dev-vc65 (VMware) | NoMethodError: undefined method `[]' for nil:NilClass | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:61:in `lookup_parent_folders' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:62:in `lookup_parent_folders' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:56:in `block in set_folder_paths' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:55:in `each' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:55:in `set_folder_paths' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:50:in `generate_folder_inventory' | /home/agrare/src/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:21:in `all'


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #22258: VMWare: Speed up VM listingClosedTimo Goebel01/12/2018Actions
Actions #1

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5297 added
Actions #2

Updated by Ohad Levy about 6 years ago

  • Category set to Compute resources - VMware
Actions #3

Updated by Ohad Levy about 6 years ago

  • translation missing: en.field_release set to 330
Actions #4

Updated by Ohad Levy about 6 years ago

Actions #5

Updated by Adam Grare about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF