Bug 468378 - Disabling available Node produces TemplateError
Disabling available Node produces TemplateError
Product: Virtualization Tools
Classification: Community
Component: ovirt-server-suite (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Scott Seago
: 470528 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-10-24 09:52 EDT by Alan Pevec
Modified: 2011-06-21 13:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-06-21 13:18:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch url attached (70 bytes, text/plain)
2009-01-20 13:41 EST, Scott Seago
no flags Details

  None (edit)
Description Alan Pevec 2008-10-24 09:52:03 EDT
Description of problem:
For _available_ Node, choosing "Disable Host" action in Node details succeeds, Node is marked as (disabled) in Status table column but yellow notification with "500" pops up and disabled Node detail view doesn't render, re-enabling is not possible since "Enable Host" action is available only in Node details.

In rails.log TemplateError is reported:
Processing HostController#show (for at 2008-10-24 13:35:30) [GET]
  Session ID: a184e5d2427ce1c62b52b453a00d530a
  Parameters: {"action"=>"show", "id"=>"1", "controller"=>"host"}
Rendering template within layouts/selection
Rendering host/show
ActionView::TemplateError (undefined method `consuming_resources' for #<Class:0x7fef61162f58>) on line #15 of host/show.rhtml:
12:         <%= image_tag "icon_suspend.png" %> Disable Host
13:       </a> 
14:     <% end -%>
15:     <%if @host.is_clear_task_valid? -%>
16:       <a href="#" onClick="host_action('clear_vms')">
17:         <%= image_tag "icon_x.png" %> Clear VMs
18:       </a> 
    app/models/host.rb:78:in `is_clear_task_valid?'
    app/views/host/show.rhtml:15:in `_run_erb_47app47views47host47show46rhtml'

Doesn't happen for _unavailable_ Nodes.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. see above
Actual results:
500 error notification, Node details doesn't render

Expected results:
Node details is rendered w/o error

Additional info:
Comment 1 Alan Pevec 2008-11-08 15:12:07 EST
*** Bug 470528 has been marked as a duplicate of this bug. ***
Comment 2 Scott Seago 2009-01-20 13:39:58 EST
A prior refactoring removed the 'do' and 'end' around an association method -- this patch restores it.
Comment 3 Scott Seago 2009-01-20 13:41:11 EST
Created attachment 329498 [details]
patch url attached

Note You need to log in before you can comment on or make changes to this bug.