Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1170276 - Provisioning fails with VMware Compute Resource if the vCenter's datacenter is using nested folders.
Provisioning fails with VMware Compute Resource if the vCenter's datacenter i...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources (Show other bugs)
6.0.6
Unspecified Linux
high Severity high with 1 vote (vote)
: 6.1.10
: Unused
Assigned To: Shlomi Zadok
jcallaha
http://projects.theforeman.org/issues...
: ReleaseNotes, Reopened, Triaged
Depends On: 1142861
Blocks: sat61-release-notes 1314090
  Show dependency treegraph
 
Reported: 2014-12-03 11:30 EST by Aaron Thomas
Modified: 2017-03-17 17:02 EDT (History)
30 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1314090 (view as bug list)
Environment:
Last Closed: 2016-09-27 07:58:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
foreman-debug (374.97 KB, application/x-xz)
2014-12-04 11:11 EST, Aaron Thomas
no flags Details
sosreport (6.80 MB, application/x-xz)
2014-12-04 11:12 EST, Aaron Thomas
no flags Details
cluster in folder (184.82 KB, image/png)
2015-04-08 05:26 EDT, gaoshang
no flags Details
failed to display (120.42 KB, image/png)
2015-04-08 05:26 EDT, gaoshang
no flags Details
hotfix patch (584 bytes, patch)
2016-06-30 13:43 EDT, Mike McCune
no flags Details | Diff
Case-01611941 (451.52 KB, image/png)
2016-07-06 23:56 EDT, Preetesh Sharma
no flags Details
verification screenshot (33.71 KB, image/png)
2016-09-22 11:07 EDT, jcallaha
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2083133 None None None 2016-06-03 12:33 EDT
Foreman Issue Tracker 1945 None None None Never
Foreman Issue Tracker 2696 None None None Never
Foreman Issue Tracker 5855 None None None Never
Foreman Issue Tracker 8581 None None None 2016-04-26 13:01 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Aaron Thomas 2014-12-03 11:30:33 EST
Description of problem:
-----------------------------------------
This issue still exists in Foreman 1.5.1. However, the patch only works if their are no organizational folders in vSphere for the cluster group. If a cluster is organized into folders under a datacenter, foreman fails to see any clusters. 

This appears to be an underlying issue with either fog or rbvmomi though. When creating a new host using VMware as a compute resource and selecting 'Deploy on' datacenter cluster folders do not show up; additionally nested folders aren't showing up either. 

1) The current upstream patch that allows the use of cluster folders in VMwares datacenters: https://github.com/fog/fog/commit/66e5521

After the committing the patch vm's are able to be automatically provisioned from Satellite using VMware as a compute resource:

vCenter -> datacenter chosen in dropdown menu -> cluster folder


2) This leads to an issue if nested cluster folders are created under a datacenter with or without the previously mentioned patch. 

Non working example with patch or without patch:
vCenter -> datacenter chosen in dropdown menu -> cluster folder ->  nested cluster folder


Version-Release number of selected component (if applicable):
-----------------------------------------
6.0.6


How reproducible:
-----------------------------------------
Easily reproducible 


Steps to Reproduce:
-----------------------------------------
1. Add VMware as a compute resource on Satellite 6.

2. Create a New Host and attempt to select a VMware datacenter cluster folder or nested folder for the 'Deploy on' option.

3. The resource does not exist.


Actual results:
-----------------------------------------
If the patch https://github.com/fog/fog/commit/66e5521 is not applied the new host is not able to be created. If the patch is applied it appears the cluster folder is selectable however provisioning fails, please see attached screenshots and debugs.

 
Expected results:
-----------------------------------------
The cluster folder or nested cluster folder is a selectable option when creating a new host and is able to be provisioned properly on Satellite 6 when using VMware as a Compute Resource.  


Additional info:
-----------------------------------------
https://github.com/fog/fog/blob/master/lib/fog/vsphere/requests/compute/list_clusters.rb

https://github.com/fog/fog/blob/master/lib/fog/vsphere/requests/compute/create_vm.rb
Comment 1 RHEL Product and Program Management 2014-12-03 11:43:46 EST
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Aaron Thomas 2014-12-04 11:11:49 EST
Created attachment 964745 [details]
foreman-debug
Comment 4 Aaron Thomas 2014-12-04 11:12:14 EST
Created attachment 964747 [details]
sosreport
Comment 5 Dominic Cleal 2014-12-05 03:56:20 EST
Connecting redmine issue http://projects.theforeman.org/issues/8581 from this bug
Comment 6 Shlomi Zadok 2015-02-12 08:20:07 EST
fixed by upstream foreman PRs: https://github.com/theforeman/foreman/pull/2014
and https://github.com/theforeman/foreman/pull/2095.

Can be cherry picked with:
Fog repo git: https://github.com/fog/fog.git
Fog commit sha1: 23bd65232bbcd0b3ae67ac40abebb9757dfa9280
Fog commit url: https://github.com/shlomizadok/fog/commit/23bd65232bbcd0b3ae67ac40abebb9757dfa9280
 
Foreman repo git: https://github.com/theforeman/foreman.git
Foreman commit sha1: de764bf506e0b1bc3ca66f477d06f57c502e002b
Foreman commit url: https://github.com/shlomizadok/foreman/commit/de764bf506e0b1bc3ca66f477d06f57c502e002b
Comment 7 Shlomi Zadok 2015-02-12 08:22:18 EST
Also seems like a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1142861 - can you please verify and close if so?
Comment 13 gaoshang 2015-04-08 05:25:00 EDT
When vCenter's datacenter is using nested folders, failed to display "Cluster", maybe related patches are not applied yet, so change status to Assigned. Please check picture attached, thanks!
Comment 14 gaoshang 2015-04-08 05:26:15 EDT
Created attachment 1012119 [details]
cluster in folder
Comment 15 gaoshang 2015-04-08 05:26:45 EDT
Created attachment 1012122 [details]
failed to display
Comment 16 Lukas Zapletal 2015-04-13 11:45:28 EDT
Can you guys re-test, I see the patch in the fog library now.
Comment 17 Lukas Zapletal 2015-04-13 11:46:18 EDT
If it fails, the patch is not correct.
Comment 18 Jason Montleon 2015-04-13 13:05:47 EDT
First of all are we talking about 6.1.0 or 6.0.4?

Lukas is referencing 6.0 repos and fog 1.21.0 which is part of 6.0, yet this bug is ACK'ed against Satellite 6.1.0 which is fog 1.24.0.

If it needs to be fixed in Satellite 6.1.0 and Satellite 6.0.z please open separate bugs. 

The patch is applied during build based on what was provided. 
http://git.app.eng.bos.redhat.com/git/katello-thirdparty.git/tree/rubygem-fog/fog-add-full-path-vsphere.patch?h=SATELLITE-6.1.0

http://git.app.eng.bos.redhat.com/git/katello-thirdparty.git/tree/rubygem-fog/fog-add-full-path-vsphere.patch?h=SATELLITE-6.0.4
Comment 19 gaoshang 2015-04-14 03:48:11 EDT
Since this bug is ACK'ed against Satellite 6.1.0, I verified it on Satellite-6.1.0-RHEL-7-20150407.1, it still failed to show cluster in nested folders, so change status to Assigned.
Comment 22 errata-xmlrpc 2015-08-12 01:20:14 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592
Comment 23 sthirugn@redhat.com 2015-08-14 16:47:06 EDT
Accidentally closed with 6.1.1 errata
Comment 25 David O'Brien 2015-08-19 22:37:47 EDT
From a rel note perspective, this is covered afaik as part of BZ 1223962: VMware Compute Resource issue in the Release notes.
Comment 26 Bryan Kearney 2015-08-26 15:18:50 EDT
Upstream bug component is Compute Resources
Comment 27 Tristan hoar 2015-09-22 09:52:06 EDT
Until this is resolved I am working around it on Satellite 6.1.2 by doing the following

[root@sat-dev ~]# cp /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.24.0/lib/fog/vsphere/requests/compute/list_clusters.rb{,.old}
[root@sat-dev ~]# curl https://raw.githubusercontent.com/fog/fog/master/lib/fog/vsphere/requests/compute/list_clusters.rb -o /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.24.0/lib/fog/vsphere/requests/compute/list_clusters.rb
[root@sat-dev ~]# katello-service restart
Comment 28 Diego Claeys 2015-12-02 04:34:43 EST
Still same issue with Satellite 6.1.4.

The work around from Tristan hoar was working for me but it's not available any more ???

Tristan, can you please put it online again.  Thanks.
Comment 34 Gary Houle 2016-02-24 10:56:02 EST
Is there a timeline or other workaround.  This was working for a period with 6.0 but seems to have regressed after upgrading to 6.1.
Comment 37 Mike McCune 2016-03-28 19:38:32 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 38 David O'Brien 2016-04-17 20:48:22 EDT
Reset docs contact <> daobrien
Comment 41 Mike McCune 2016-06-30 13:42:01 EDT
** SATELLITE 6.1 HOTFIX INSTRUCTIONS **

This patch only applies to Satellite 6.1

1) Download attached 170276-HOTFIX.patch hotfix patch file to your Satellite

2) cp 170276-HOTFIX.patch /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.24.1/

3) cd /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.24.1/

4) patch -p1 < 170276-HOTFIX.patch

5) katello-service restart

6) resume operations
Comment 42 Mike McCune 2016-06-30 13:43 EDT
Created attachment 1174702 [details]
hotfix patch
Comment 43 Preetesh Sharma 2016-07-06 23:55:42 EDT
Hi Mike,

Customer in case# 01611941 has tried entire system update (and katello-installer --upgrade) and the hotfix but it still doesn't work.
Please find attached screenshot shared by customer in ticket.

Preetesh
Comment 44 Preetesh Sharma 2016-07-06 23:56 EDT
Created attachment 1177131 [details]
Case-01611941
Comment 58 jcallaha 2016-09-22 11:07:14 EDT
Verified in Satellite 6.1.10 Snap 1.1

Cluster now shows up as expected. See attached screenshot for verification.
Comment 59 jcallaha 2016-09-22 11:07 EDT
Created attachment 1203794 [details]
verification screenshot
Comment 60 Bryan Kearney 2016-09-27 07:58:40 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1938

Note You need to log in before you can comment on or make changes to this bug.