Project

General

Profile

Bug #2001

Changing Loc or Org after compute resource selection give 500 error

Added by Romain Vrignaud over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

If I select an initial Location and Org :
it filters what compute resources are available.
If I select one compute resource and then change location
and pick one wich does not contains the selected cr,
I get a 500 and compute resources not refreshed.

Rendered hosts/_compute.html.erb (1.9ms)
Rendered hosts/_unattended.html.erb (4.3ms)
Rendered hosts/_form.html.erb (194.2ms)
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Operation FAILED: undefined method `new_vm' for nil:NilClass
/opt/foreman/app/models/orchestration/compute.rb:23:in `compute_object'
/opt/foreman/app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb___1539370346_70368586664280_5599436'
/opt/foreman/vendor/ruby/1.8/gems/actionpack-3.0.17/lib/action_view/template.rb:135:in `send'
/opt/foreman/vendor/ruby/1.8/gems/actionpack-3.0.17/lib/action_view/template.rb:135:in `render'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/notifications.rb:54:in `ins


Related issues

Has duplicate Foreman - Bug #2009: error 500 when trying to show a vm in an org / loc Duplicate2012-12-05
Has duplicate Foreman - Bug #2006: Random 404 error in host edit pageDuplicate2012-12-05

Associated revisions

Revision 2fa95807 (diff)
Added by Joseph Magen over 9 years ago

fixes #2001 - Changing Loc or Org after compute resource selection give 500 error

History

#1 Updated by Ohad Levy over 9 years ago

so a possible solution would be to redirect to the index action of each controller after a org/location switch?

#2 Updated by Ohad Levy over 9 years ago

  • Assignee changed from Ohad Levy to Joseph Magen

@Joseph, I think this maybe the same bug as the one you are working on?

#3 Updated by Ohad Levy over 9 years ago

both #2009 and this ticket happens when there is a mismatch between host direct attributes (such as subnet) and the location or org that does not contain that subnet.

#4 Updated by Joseph Magen over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF