Project

General

Profile

Bug #2567

provisioning a new (ovirt) host does not work.

Added by Jason Montleon about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

In 1.2-RC1, when I try to provision a new ovirt VM I get the error message in the logs:
Failed to save: Settings up compute instance s05.montleon.priv task failed with the following error: undefined method `join' for #<String:0x00000007bc11f8>

All I get in the UI is:
Settings up compute instance s05.montleon.priv task failed with the following error: undefined method `join' for #

I guess this is something to do with provisioning on compute resources or ovirt specifically, as I was able to create a 'bare metal' host entry no problem.


Related issues

Related to Foreman - Feature #2288: Quota Support for RHEV 3.1Closed2013-03-06

Associated revisions

Revision dd2b55dc (diff)
Added by Dominic Cleal about 6 years ago

fixes #2567 - handle backtraces correctly in compute orchestration errors

Revision 46d8e342 (diff)
Added by Dominic Cleal about 6 years ago

fixes #2567 - handle backtraces correctly in compute orchestration errors
(cherry picked from commit dd2b55dc928cf2ef0dc8befcb867a9816864239b)

History

#1 Updated by Dominic Cleal about 6 years ago

  • Status changed from New to Need more information
  • Target version set to 1.2.0

Could you try this patch please and see if you get a full backtrace appear in production.log? This should narrow down the source.

http://paste.fedoraproject.org/14706/38659136/

#2 Updated by Jason Montleon about 6 years ago

That gave me a much bigger trace, and not that it tells me too much, I figured out what the issue was. I had quotas enabled on the oVirt cluster and had to disable them. I know this is an issue, and have a separate ticket to add quota support to Foreman (we hacked it into 1.1, and can probably do the same in 1.2, but it's pretty ugly. fog and rbovirt have the necessary pieces now though, so there is that).

The error was just really odd and not what I had see before. Anyway, here is the full trace and thanks for your help:

Settings up compute instance s05.montleon.priv task failed with the following error: undefined method `join' for #<String:0x0000000921b7c8>/usr/share/foreman/app/models/orchestration.rb:38:in `failure'
/usr/share/foreman/app/models/orchestration/compute.rb:61:in `rescue in setCompute'
/usr/share/foreman/app/models/orchestration/compute.rb:58:in `setCompute'
/usr/share/foreman/app/models/orchestration.rb:151:in `execute'
/usr/share/foreman/app/models/orchestration.rb:91:in `block in process'
/usr/share/foreman/app/models/orchestration.rb:83:in `each'
/usr/share/foreman/app/models/orchestration.rb:83:in `process'
/usr/share/foreman/app/models/orchestration.rb:21:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:627:in `_run__1186031621496986347__save__1898324952209476636__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/lib/foreman/sti.rb:26:in `save_with_type'
/usr/share/foreman/app/controllers/hosts_controller.rb:87:in `create'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:527:in `block (3 levels) in run_943097262498628514__process_action__65197116517404970__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_4568'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_911'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4568'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:526:in `block (2 levels) in _run
_943097262498628514__process_action__65197116517404970__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_4567'
/usr/share/foreman/lib/foreman/thread_session.rb:31:in `clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4567'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run
_943097262498628514__process_action__65197116517404970__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_4566'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4566'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run
_943097262498628514__process_action__65197116517404970__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
--

#3 Updated by Dominic Cleal about 6 years ago

  • Status changed from Need more information to Ready For Testing
  • Assignee set to Dominic Cleal

Jason Montleon wrote:

That gave me a much bigger trace, and not that it tells me too much, I figured out what the issue was. I had quotas enabled on the oVirt cluster and had to disable them. I know this is an issue, and have a separate ticket to add quota support to Foreman (we hacked it into 1.1, and can probably do the same in 1.2, but it's pretty ugly. fog and rbovirt have the necessary pieces now though, so there is that).

Ah yes, #2288.

The error was just really odd and not what I had see before. Anyway, here is the full trace and thanks for your help:

Settings up compute instance s05.montleon.priv task failed with the following error: undefined method `join' for #<String:0x0000000921b7c8>/usr/share/foreman/app/models/orchestration.rb:38:in `failure'
/usr/share/foreman/app/models/orchestration/compute.rb:61:in `rescue in setCompute'

Right, this is a bug in the setCompute method I think as it's joining the backtrace together, then calling failure() which tries to join the backtrace again. Could you try this out please?

https://github.com/theforeman/foreman/pull/655

(obviously this doesn't fix the underlying cause of lack of quota support, but hopefully will display a better error.)

#4 Updated by Dominic Cleal about 6 years ago

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

Also available in: Atom PDF