Project

General

Profile

Bug #25849

VMware compute resource cannot find VM folders when datacenters are themselves nested in folders

Added by J. A. 9 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Using Foreman 1.20.1 and vCenter 6.7.

Our vCenter has folders at the top level, and the datacenter objects are in those folders.

We are successfully adding our vCenter as a compute resource in Foreman, however, when creating a new host - as well as when configuring compute profiles - the "Folder" drop-down box in the "Virtual Machine" tab is empty (and contains the text "No matches found"), despite there being folders in vCenter. If we move the datacenter objects out of the folders, directly under the top vCenter object, Foreman lists all the folders correctly.

This prevents creating hosts: when submitting the new host for provisioning with "No matches found" in the folder drop-down box, Foreman passes a nil folder path where fog-vsphere expects a string, causing a NoMethodError for String#sub.

I'm not sure whether this used to work or not. Folder listing has worked before for this Foreman-vCenter combination. However, we recently upgraded from Foreman 1.16 to 1.20 (through the intermediates), and vCenter 6.5 to 6.7, but it's unclear whether we actually had datacenters nested in folders prior to the upgrades.

Putting datacenters in folders is apparently a VMware recommendation when setting up vCenter. Maybe it has something to do with more flexible management of permissions?

History

#1 Updated by Tomer Brisker 9 months ago

  • Category set to Compute resources - VMware

#2 Updated by A Ops 7 months ago

First of all, thanks for a great product!

We have exactly the same issue, any fix on its way?

#3 Updated by Chun-Liang Lin 5 months ago

We have the same problem in Foreman 1.18.3 and vCenter 6.7.

#4 Updated by Martin Reemala 4 months ago

Hi

We had the same issue but with different version.
It works fine with 1.20.2 with ESX 6.5 but when we update to 1.21 it doesn't work.

#5 Updated by Ondřej Ezr 4 months ago

  • Bugzilla link set to 1717248

#6 Updated by Chris Roberts 3 months ago

  • Pull request https://github.com/fog/fog-vsphere/pull/214 added

#7 Updated by Chris Roberts 3 months ago

  • Triaged changed from No to Yes
  • Difficulty set to easy
  • Target version set to 1.23.0
  • Assignee set to Chris Roberts
  • Status changed from New to Resolved
  • Found in Releases 1.22.0 added
  • Found in Releases deleted (1.20.1)
  • Fixed in Releases 1.23.0 added

Also available in: Atom PDF