Bug #28055
closedActionView::Template::Error: undefined method `resource_pools' for nil:NilClass
Description
Hello,
Randomly i have the error given in object in the log foreman.
This error appears as a result of an API call : /foreman/api/compute_profiles/5 (i only have one id)
I have 2 platforms (production and integration) where i have the same symptom.
foreman Version : 1.22.1
tfm-rubygem-fog-vsphere version : 3.2.1
The result is that external app calls using the API fail.
I attach an excerpt from the log corresponding to the error.
Regards
Files
Updated by Tomer Brisker over 5 years ago
- Category set to Compute resources - VMware
Updated by Thierry Milhau about 5 years ago
- Priority changed from Normal to High
Hello, I am now in version 1.24.2 of Foreman and I still have this problem. Before it was often on the test platform. Now is also often on the production platform. Is it possible to have help? Thanks
Updated by Thierry Milhau about 5 years ago
My URL is now : $URL_FOREMAN/api/compute_profiles/5
Updated by Thierry Milhau about 5 years ago
2020-04-16T09:49:16 [I|app|515d5975] Started GET "/api/compute_profiles/5" for xxxxxxxx at 2020-04-16 09:49:16 +0200
2020-04-16T09:49:16 [I|app|515d5975] Processing by Api::V2::ComputeProfilesController#show as JSON
2020-04-16T09:49:16 [I|app|515d5975] Parameters: {"apiv"=>"v2", "id"=>"5"}
2020-04-16T09:49:16 [D|tax|515d5975] Current location set to none
2020-04-16T09:49:16 [D|tax|515d5975] Current organization set to none
2020-04-16T09:49:16 [I|app|515d5975] Rendering api/v2/compute_profiles/show.json.rabl
2020-04-16T09:49:16 [D|app|515d5975] Reading from compute resource cache: folders
2020-04-16T09:49:16 [D|app|515d5975] Reading from compute resource cache: clusters
2020-04-16T09:49:16 [D|app|515d5975] Reading from compute resource cache: resource_pools-CLUSTER_TRP1_PFHP_STD
2020-04-16T09:49:16 [D|app|515d5975] Reading from compute resource cache: cluster-CLUSTER_TRP1_PFHP_STD
2020-04-16T09:49:16 [I|app|515d5975] Rendered api/v2/compute_profiles/show.json.rabl (61.2ms)
2020-04-16T09:49:16 [W|app|515d5975] Action failed
2020-04-16T09:49:16 [D|app|515d5975] Backtrace for 'Action failed' error (ActionView::Template::Error): undefined method `resource_pools' for nil:NilClass
2020-04-16T09:49:16 [I|app|515d5975] Rendering api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout
2020-04-16T09:49:16 [I|app|515d5975] Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (0.7ms)
2020-04-16T09:49:16 [I|app|515d5975] Completed 500 Internal Server Error in 112ms (Views: 2.6ms | ActiveRecord: 20.6ms)
Updated by Ondřej Ezr over 4 years ago
Hi, sorry for the delay.
Is this happening even if you turn off the cache on the compute resource?
Updated by Tomer Brisker almost 4 years ago
- Status changed from New to Duplicate
Updated by Tomer Brisker almost 4 years ago
- Is duplicate of Bug #30548: VMWare compute profile is providing wrong information when using hammer and api. added