Project

General

Profile

Actions

Bug #17883

closed

Problem with resource pool vCenter 5.5

Added by Alexandre JARC almost 8 years ago. Updated about 6 years ago.

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

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

production-create host.log.txt production-create host.log.txt 23.6 KB Alexandre JARC, 12/30/2016 09:54 AM
production-select cluster.log.txt production-select cluster.log.txt 13.6 KB Alexandre JARC, 12/30/2016 09:54 AM
production.log production.log 1.95 MB Alexandre JARC, 12/30/2016 10:06 AM
image2.png View image2.png 9.58 KB Alexandre JARC, 01/03/2017 04:36 AM
image1.png View image1.png 13.2 KB Alexandre JARC, 01/03/2017 04:36 AM
output_script.txt output_script.txt 556 Bytes Alexandre JARC, 01/10/2017 11:22 AM
Actions #1

Updated by Anonymous almost 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 almost 8 years ago

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 !

Actions #3

Updated by Anonymous almost 8 years ago

Is there some nested folder structure regarding clusters or resource pools configured in that setup?

Actions #4

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

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))

Actions #6

Updated by Anonymous almost 8 years ago

Timo, any idea on that?

Actions #7

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?

Actions #8

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 !

Actions #9

Updated by Alexandre JARC over 7 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

Actions #10

Updated by Timo Goebel over 7 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?

Actions #11

Updated by Alexandre JARC over 7 years ago

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 !

Actions #12

Updated by Timo Goebel over 7 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.

https://github.com/vmware/rbvmomi/issues

Actions #13

Updated by Karl Vallot over 7 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.

Actions #14

Updated by Alexandre JARC over 7 years ago

I just try, and with an "-" in the datacenter name it's ok. :)

Thank a lot for every answers.

Actions #15

Updated by Karl Vallot over 7 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 ?

Actions #16

Updated by Marek Hulán over 7 years ago

  • Target version set to 115
Actions #17

Updated by Marek Hulán over 7 years ago

  • Tracker changed from Support to Bug
  • Bugzilla link set to 1427319
Actions #18

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.

Actions #19

Updated by Marek Hulán over 7 years ago

  • Target version changed from 1.13.0 to 1.13.2
Actions #20

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.

Actions #21

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
Actions #22

Updated by Marek Hulán over 7 years ago

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

Updated by Marek Hulán over 7 years ago

  • Translation missing: en.field_release set to 240
Actions #24

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)

Actions

Also available in: Atom PDF