Foreman 1.20.2 / VMware - Sporadic HTTP 500 when querying /api/compute_resources API

I hope I’ve found solution for this issue: https://github.com/fog/fog-vsphere/pull/267

1 Like

I’m about to update my 4 Foreman servers to 2.1.4 within the next 2 weeks or so. I plan to manually implement your PR and enable the Vsphere caching functionality as well. I will keep you updated how it turns out …

1 Like

Hi,

the fix has been merged and released in fog-vsphere 3.5.0 this will only get released with foreman 2.4, if anyone could confirm it fixed the issue it would be awesome :slight_smile:

Sorry for the late reply.

I’m currently running Foreman 2.1.4. I’ve implemented your PR (backport to tfm-rubygem-fog-vsphere-3.3.1-1) and caching for the Vsphere resources are currently enabled.

I looks like, that I’m still getting very sporadic HTTP 500 Errors when querying /api/compute_resources. But the error message looks less detailed know (maybe I’ve to raise the debug level):

2020-12-23T10:52:09 [I|app|400a1154] Started GET "/api/compute_resources/4?id=4" for 130.197.4.79 at 2020-12-23 10:52:09 +0100
2020-12-23T10:52:09 [I|app|400a1154] Processing by Api::V2::ComputeResourcesController#show as JSON
2020-12-23T10:52:09 [I|app|400a1154]   Parameters: {"id"=>"4", "apiv"=>"v2", "compute_resource"=>{}}
2020-12-23T10:52:09 [I|app|400a1154]   Rendering api/v2/compute_resources/show.json.rabl
2020-12-23T10:52:09 [I|app|2095b854]   Rendering text template
2020-12-23T10:52:09 [I|app|2095b854]   Rendered text template (Duration: 0.0ms | Allocations: 2)
2020-12-23T10:52:09 [I|app|2095b854] Completed 200 OK in 105ms (Views: 0.6ms | ActiveRecord: 18.3ms | Allocations: 34930)
2020-12-23T10:52:09 [I|app|400a1154]   Rendered api/v2/compute_resources/show.json.rabl (Duration: 12.9ms | Allocations: 8283)
2020-12-23T10:52:09 [W|app|400a1154] Action failed
2020-12-23T10:52:09 [I|app|400a1154]   Rendering api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout
2020-12-23T10:52:09 [I|app|400a1154]   Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (Duration: 0.3ms | Allocations: 92)
2020-12-23T10:52:09 [I|app|400a1154] Completed 500 Internal Server Error in 23ms (Views: 0.9ms | ActiveRecord: 2.3ms | Allocations: 11022)