Bug #10336
closedforeman-rake prints "Workaround for RbVmomi may not work as ComputeResource is already loaded: #{ComputeResource}"
Description
The message is found in /usr/share/foreman/config/initializers/rbvmomi.rb (installed from RPM).
Having a look at the source code it seems that nothing else is done except printing that message. It doesn't cause any side effect except cron sending out mails every time a foreman-rake is run.
If it helps, this is what Dominic said on IRC:[10:23:40] <Dominic> it's a bug in the codebase, I think it's because the fast_gettext.rb initialiser is running first and the log message isn't entirely accurate. we should probably move rbvmomi.rb "up"
Updated by Dominic Cleal over 9 years ago
- Related to Bug #2680: Unable to provisioning host using UI - vSphere 4.1.0 added
Updated by Dominic Cleal over 9 years ago
- Category set to Compute resources
If it's what I suspect (untested) we could either:
- rename rbvmomi.rb so it comes before fast_gettext.rb
- make the test that prints the warning more intelligent, so it checks if it's our ComputeResource class
Updated by Andrew F over 9 years ago
Dominic Cleal wrote:
If it's what I suspect (untested) we could either:
- rename rbvmomi.rb so it comes before fast_gettext.rb
- make the test that prints the warning more intelligent, so it checks if it's our ComputeResource class
This issue was prevented me from creating hosts with VMWare.
Renaming rbvmomi has fixed it for now. We are running the v1.8.0 RPM on RHEL 6.6
For reference, I ran the following and restarted the foreman service.
mv /usr/share/foreman/config/initializers/{,0_}rbvmomi.rb
From production.log:
2015-05-04 12:13:00 [W] Failed to create a compute <Compute Resource> (VMware) instance <hostname>: failed to create vm: undefined method >` resourcePool' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.28.0/lib/fog/vsphere/requests/compute/create_vm.rb:28:in `rescue in create_vm'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.28.0/lib/fog/vsphere/requests/compute/create_vm.rb:8:in `create_vm'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.28.0/lib/fog/vsphere/models/compute/server.rb:232:in `save'
/usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb:322:in `create_vm'
etc
Updated by Dominic Cleal over 9 years ago
- Related to Bug #9779: first host creation submit doesn't work using VMWare compute resource added
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2382 added
- Pull request deleted (
)
Updated by Dominic Cleal over 9 years ago
- Related to Feature #4478: API docs need to be localized added
Updated by Dominic Cleal over 9 years ago
- Assignee set to Dominic Cleal
- Translation missing: en.field_release set to 50
Thanks for the info, that would explain why the error came back too, since this was originally added to fix the same error under #2680.
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 70bd0d265e82a42256d47a8f78456f9c41bdc577.