Project

General

Profile

Actions

Bug #10336

closed

foreman-rake prints "Workaround for RbVmomi may not work as ComputeResource is already loaded: #{ComputeResource}"

Added by Elisiano Petrini over 9 years ago. Updated over 6 years ago.

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

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"


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #2680: Unable to provisioning host using UI - vSphere 4.1.0ClosedDominic Cleal06/19/201306/20/2013Actions
Related to Foreman - Bug #9779: first host creation submit doesn't work using VMWare compute resourceResolved03/16/2015Actions
Related to Foreman - Feature #4478: API docs need to be localizedClosedMartin Bacovsky02/27/2014Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #2680: Unable to provisioning host using UI - vSphere 4.1.0 added
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Category set to Compute resources

If it's what I suspect (untested) we could either:

  1. rename rbvmomi.rb so it comes before fast_gettext.rb
  2. make the test that prints the warning more intelligent, so it checks if it's our ComputeResource class
Actions #3

Updated by Andrew F over 9 years ago

Dominic Cleal wrote:

If it's what I suspect (untested) we could either:

  1. rename rbvmomi.rb so it comes before fast_gettext.rb
  2. 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

Actions #4

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #9779: first host creation submit doesn't work using VMWare compute resource added
Actions #5

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 ()
Actions #6

Updated by Dominic Cleal over 9 years ago

Actions #7

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.

Actions #8

Updated by Dominic Cleal over 9 years ago

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

Also available in: Atom PDF