Bug #17883
closedProblem with resource pool vCenter 5.5
Description
Hi,
I'm not really good in english, so excuse me !
When i want to create a new host, everything is ok (i see every cluster, lun, lan etc...) but i can't see my resource pool...
I just have this message : undefined method `resourcePool' for nil:NilClass
vCenter version : 5.5
Foreman : 1.14.0-RC2
I don't find the solution... Thank for your help.
Files
Updated by Anonymous about 8 years ago
Please find the corresponding error line in /var/log/foreman/production.log and paste it here, including the whole backtrace.
Updated by Alexandre JARC about 8 years ago
- File production-create host.log.txt production-create host.log.txt added
- File production-select cluster.log.txt production-select cluster.log.txt added
- File production.log production.log added
I add three production.log. When i select cluster, when i try to create the host and the entire production.log.
I find this in production-select cluster :
2016-12-30T15:49:56 607767ca [app] [I] Parameters: {"cluster_id"=>"Lomaco (Figeac)/Cluster Clients", "id"=>"1-vCenter Caelis"}
2016-12-30T15:49:56 607767ca [app] [W] Action failed
| Fog::Compute::Vsphere::NotFound: Fog::Compute::Vsphere::NotFound
And
2016-12-30T15:49:56 607767ca [app] [I] Rendered common/500.html.erb (4.3ms)
2016-12-30T15:49:56 607767ca [app] [I] Completed 500 Internal Server Error in 283ms (Views: 5.2ms | ActiveRecord: 2.6ms)
And this in production-create host :
2016-12-30T15:51:54 607767ca [app] [W] Échec de création de l'instance pedro-perra.exploitation.lomaco.fr sur la ressource de calcul vCenter Caelis (VMware) : undefined method `resourcePool' for nil:NilClass | NoMethodError: undefined method `resourcePool' for nil:NilClass
I don't how if this can help you... But thank a lot !
Updated by Anonymous almost 8 years ago
Is there some nested folder structure regarding clusters or resource pools configured in that setup?
Updated by Alexandre JARC almost 8 years ago
On my vCenter i just have two cluster and one ressource pool in one of them. (Create just to foreman)
I configure my vCenter with the GUI in Compute Resource. (By using the administrator account). That's all.
I have created a resource pool in my cluster Lomaco called "Ressource", however by default foreman should normally see a pool called "Resource" and i can't see him.
Can we force the detection of the pool or something ?
Thank a lot
Updated by Alexandre JARC almost 8 years ago
- File image1.png image1.png added
- File image2.png image2.png added
Btw, before i select my cluster, i can roll the resource pool menu (With "No Matches Found").(image(1))
But when i select a cluster, i have this message :
2017-01-03T10:29:42 907af286 [app] [I] Rendered common/500.html.erb (3.2ms)
2017-01-03T10:29:42 907af286 [app] [I] Completed 500 Internal Server Error in 286ms (Views: 4.0ms | ActiveRecord: 2.3ms)
And after that i can't roll in the menu. (image(2))
Updated by Timo Goebel almost 8 years ago
Michael Moll wrote:
Timo, any idea on that?
Yeah, it might just be the folder structure. But that's just a hunch and I don't have an environment to confirm this.
Alexandre, if I'd give you some debugging commands. Could you run them for me and show me the results?
Updated by Alexandre JARC almost 8 years ago
Timo Goebel wrote:
Michael Moll wrote:
Timo, any idea on that?
Yeah, it might just be the folder structure. But that's just a hunch and I don't have an environment to confirm this.
Alexandre, if I'd give you some debugging commands. Could you run them for me and show me the results?
Of course, everything you want !
Updated by Alexandre JARC almost 8 years ago
Hi guys, happy new year.
Do you have any idea since the last time ?
Which command do you want me to execute ?
Thank a lot, have a nice day
Updated by Timo Goebel almost 8 years ago
Alexandre JARC wrote:
Which command do you want me to execute ?
I have prepared a little script to collect some some debug information:
https://gist.github.com/timogoebel/67ed5d62b02d2a125c07a0d96c249338
Could you run it and provide the output? That should help in pinpointing this.
It runs fine in my environment with vSphere 6.0. But it was working fine with 5.5 as well.
I think, the problem is that fog-vsphere is unable to resolve the cluster through fog-vsphere:
| Fog::Compute::Vsphere::NotFound: Fog::Compute::Vsphere::NotFound
| /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-vsphere-1.5.2/lib/fog/vsphere/requests/compute/get_cluster.rb:7:in `get_cluster'
My gut feeling is, that either the nesting (Lomaco (Figeac)/Cluster Clients) or the special characters (the brackets) make problems. Alexandre, can you try to get rid of these problems?
Updated by Alexandre JARC almost 8 years ago
- File output_script.txt output_script.txt added
Hi.
I joined the output of the script.
Also, i just created a new datacenter and new cluster on my vCenter without "( )" aaaand.... surprise ! It's works... I can see the default resource pool of vCenter.
I don't know if we can change the name without having a problem with our infrastructure, I'm waiting information from our vmware administrator.
In case it's not possible, do you have any idea to resolve this ? (I know, it's really dumb to have put ( ) right here...)
Thank a lot !
Updated by Timo Goebel almost 8 years ago
Alexandre JARC wrote:
In case it's not possible, do you have any idea to resolve this ? (I know, it's really dumb to have put ( ) right here...)
I don't, do be honest. I believe the issue is in the library rbvmomi. fog-vsphere just passes the parameters through to rbvmomi. I don't know rbvmomi well enough to help.
I'd suggest opening an issue for rbvmomi. Describe, that you have a problem with the parenthesis and show them the relevant parts from my test script + the output.
They should be able to help.
Updated by Karl Vallot almost 8 years ago
Hi,
I've got the same problem but I haven't got "()" in the name of my datacenter or in the name of my cluster.
I've just got "-" in the name of my cluster, do you think the problem may be that ?
Thanks for your help.
Updated by Alexandre JARC almost 8 years ago
I just try, and with an "-" in the datacenter name it's ok. :)
Thank a lot for every answers.
Updated by Karl Vallot almost 8 years ago
Thank you for your answer, but the "-" is in the Cluster name and I still can't see the Pools in foreman.
Has some one got a other idea ?
Updated by Marek Hulán almost 8 years ago
- Tracker changed from Support to Bug
- Bugzilla link set to 1427319
Updated by Marek Hulán over 7 years ago
- Status changed from New to Assigned
- Assignee set to Marek Hulán
- Target version changed from 115 to 1.13.0
I believe I found the issue in fog-vsphere. I sent a patch to this project. We'll need to bump the version after new version is released. Any character that has special meaning in regular expression that was used in data center name would cause similar issues.
See https://github.com/fog/fog-vsphere/pull/85 for more details and status.
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.13.0 to 1.13.2
Updated by Marek Hulán over 7 years ago
The PR has been merged and released in fog-vsphere 1.9.2. Update in packaging opened as https://github.com/theforeman/foreman-packaging/pull/1650, once it gets merged we can bump the dependency in Foreman which will fix this issue.
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4526 added
Updated by Marek Hulán over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 89d479d1f06b3d1f9b6738402d303db7cc55f2cf.
Updated by Marek Hulán over 7 years ago
- Translation missing: en.field_release set to 240
Updated by Karl Vallot over 7 years ago
Hi,
I upgraded foreman from the version 12 to 15 and never found the solution to see the pools in Vsphere.
I changed the folder : bundler.d/vmware.rb from 1.7.0 to 1.9.2 like you said ; But I already use the version 1.10 so that's not the solution.
I created a pool name with just letters and still not working.
Could you please give me a solution.
Thank you very much.
PS : I have got one idea... Is it possible that we need the version 2.1 of ruby for fog-vsphere to work knowing that the version 2.1 is not avalible on ubuntu 14.04 ?
I still dont understand why it just can't recover the pool name like foreman recovers the names of the clusters and the folders (If you could indent the folders it would be great too)