Project

General

Profile

Actions

Bug #3567

closed

Editing an oVirt compute resource can throw errors loading quotes while loading page

Added by Dominic Cleal over 10 years ago. Updated over 5 years ago.

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

Description

When editing an oVirt compute resource that's currently failing (e.g. bad admin password), the form won't load as it tries to get a list of quotas to display.

ActionView::Template::Error (401 Unauthorized):
    9:                  :class => "btn + #{datacenters.empty? ? "" : "btn-success"}",
    10:                  :'data-url' => test_connection_compute_resources_path) + image_tag('/assets/spinner.gif', :id => 'test_connection_indicator', :class => 'hide').html_safe }) %>
    11: <% quotas = (f.object.uuid.nil? && controller.action_name != 'test_connection') ? [] : f.object.quotas rescue []%>
    12: <%= select_f f, :ovirt_quota, quotas, :id, :name, {}, :label => _("Quota ID") %>
  app/helpers/layout_helper.rb:102:in `block in select_f'
  app/helpers/layout_helper.rb:130:in `block (2 levels) in field'
  app/helpers/layout_helper.rb:129:in `block in field'
  app/helpers/layout_helper.rb:124:in `field'
  app/helpers/layout_helper.rb:101:in `select_f'
  app/views/compute_resources/form/_ovirt.html.erb:12:in `_e7f9f939742f59e4e7d0512e1f936645'
  app/views/compute_resources/_form.html.erb:25:in `block in _d266af4e81ccfd6ac887a7d9ddb43142'
  app/helpers/layout_helper.rb:207:in `form_for'
  app/views/compute_resources/_form.html.erb:2:in `_d266af4e81ccfd6ac887a7d9ddb43142'
  app/views/compute_resources/edit.html.erb:3:in `_85d3215036b294085739cb8c859e0d6d'
  app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'

It appears the f.object.quotas rescue [] doesn't work because the quotas are lazy-loaded, so it only fails when rendering the select box.


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #4354: Can't modify compute resource if the host has been changedDuplicate02/15/2014Actions
Actions #1

Updated by Leah Fisher over 10 years ago

I get a similar stack trace when trying to edit the url as my oVirt computer resource hostname changed.

OVIRT::OvirtException
No route to host - connect(2)
app/helpers/layout_helper.rb:102:in `block in select_f'
app/helpers/layout_helper.rb:130:in `block (2 levels) in field'
app/helpers/layout_helper.rb:129:in `block in field'
app/helpers/layout_helper.rb:124:in `field'
app/helpers/layout_helper.rb:101:in `select_f'
app/views/compute_resources/form/_ovirt.html.erb:12:in `_app_views_compute_resources_form__ovirt_html_erb__4002904617136824044_69772300'
app/views/compute_resources/_form.html.erb:25:in `block in app_views_compute_resources_form_html_erb__4329327287041218040_70310364708480'
app/helpers/layout_helper.rb:205:in `form_for'
app/views/compute_resources/_form.html.erb:2:in `_app_views_compute_resources__form_html_erb__4329327287041218040_70310364708480'
app/views/compute_resources/edit.html.erb:3:in `_app_views_compute_resources_edit_html_erb__1218224518361486307_70310364700580'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'

Actions #2

Updated by Dominic Cleal about 10 years ago

  • Has duplicate Bug #4354: Can't modify compute resource if the host has been changed added
Actions #3

Updated by Amos Benari about 10 years ago

  • Status changed from New to Ready For Testing
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal about 10 years ago

  • Assignee set to Amos Benari
  • Target version set to 1.9.1
Actions #5

Updated by Dominic Cleal about 10 years ago

  • translation missing: en.field_release set to 5
Actions #6

Updated by Amos Benari about 10 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF