Host group selection in Create Host form fails: uninitialized constant Fog::Compute::Vsphere::Network
- Create a Host
- Select the Host Group in which a VMware compute resource is used
- The request is not successful
- In the log, the following issue appears:
2019-05-24T23:01:17 [W|app|4701f1a7] Action failed
ActionView::Template::Error: uninitialized constant Fog::Compute::Vsphere::Network
Did you mean? Fog::Network
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:285:in `block in constantize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/core_ext/marshal.rb:10:in `rescue in load'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/cache.rb:358:in `block in read'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/cache.rb:663:in `block in instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/template.rb:159:in `block in render'
There are similar reports:
#1 Updated by Bernhard Suttner almost 4 years ago
Looks like, running a "Refresh Cache" on the "Infrastructure -> Compute Resources -> Your VMware Provider" can "fix" it. But I don't know if it happens again afer some other request.
#2 Updated by Bernhard Suttner almost 4 years ago
... it happens again. So, refresh cache doesn't fix it completely and it happend somehow again. its a random issue and it looks like, maybe a timing issue.
#3 Updated by Bernhard Suttner almost 4 years ago
- Subject changed from Host group in Create Host form can not be selected: uninitialized constant Fog::Compute::Vsphere::Network to Host group selection in Create Host form fails: uninitialized constant Fog::Compute::Vsphere::Network
#4 Updated by Bernhard Suttner almost 4 years ago
Easiest steps to reproduce:
- open the create host tab about 10 times
- in each tab, select the host group in which a VMware compute resource is used
Pretty sure that it fails in one tab. If it fails, the above 500 server error in the log appears and the VMware data, like the VMware datastores etc are not shown.
#5 Updated by Bernhard Suttner almost 4 years ago
I'm not 100% sure yet as tests still pending however I think it has to do with the following change:
fixes #23369 - load vmware datastores async
This commit changes the loading of the VMware datastores and uses the compute resource API. Unfortunately the API often returns 500 server errors. See https://community.theforeman.org/t/foreman-1-20-2-vmware-sporadic-http-500-when-querying-api-compute-resources-api/13907/8 and https://community.theforeman.org/t/hammer-compute-resource-networks-id-with-vsphere-intermittent-rand/13849
#6 Updated by The Foreman Bot almost 4 years ago
- Assignee set to Bernhard Suttner
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6803 added
#7 Updated by Tomer Brisker almost 4 years ago
- Category set to Compute resources - VMware
- Fixed in Releases 1.22.0 added
#8 Updated by Anonymous almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 6d78db20f781a7c9a1c234c35e6cff4719e6be71.
#9 Updated by Marek Hulán over 3 years ago
- Bugzilla link set to 1756439
Fixes #26873 - fix vsphere networks (auto)-loading
Due to a race condition, sometimes the the failure 'uninitialized constant Fog::Compute::Vsphere::Network' happens when using the compute-resource networks API.
Similar happend to Fog::Compute::Vsphere::Cluster