Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1156166

Summary: Unable to Add host
Product: Red Hat OpenStack Reporter: Martin Pavlásek <mpavlase>
Component: ruby193-rubygem-staypuftAssignee: Brad P. Crochet <brad>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: brad, dnavale, mburns, rhos-maint, sasha, yeylon
Target Milestone: z2Keywords: ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ruby193-rubygem-staypuft-0.4.10-1.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-04 17:03:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Pavlásek 2014-10-23 17:41:32 UTC
Description of problem:
I'm not able to add new host from web UI, because of backtrace.

Version-Release number of selected component (if applicable):
ruby193-rubygem-staypuft-0.4.8-1.el6ost.noarch

How reproducible:
allways

Steps to Reproduce:
1. Login to foreman, 
2. Hosts - New hosts

Actual results:
undefined method `to_label' for nil:NilClass

Full backtrace (from web ui):
NoMethodError
undefined method `to_label' for nil:NilClass
app/views/hosts/_form.html.erb:51:in `block (3 levels) in _app_views_hosts__form_html_erb__3948409973312011993_70999740'
app/views/hosts/_form.html.erb:51:in `reject'
app/views/hosts/_form.html.erb:51:in `block (2 levels) in _app_views_hosts__form_html_erb__3948409973312011993_70999740'
app/helpers/layout_helper.rb:261:in `form_for'
app/views/hosts/_form.html.erb:8:in `block in _app_views_hosts__form_html_erb__3948409973312011993_70999740'
app/models/taxonomy.rb:51:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:148:in `as_location'
app/models/taxonomy.rb:50:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:113:in `as_org'
app/models/taxonomy.rb:49:in `as_taxonomy'
app/views/hosts/_form.html.erb:6:in `_app_views_hosts__form_html_erb__3948409973312011993_70999740'
app/views/hosts/new.html.erb:7:in `_app_views_hosts_new_html_erb__487605770240425712_71544300'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call' 

Expected results:
Form for add host will be displayed.

Additional info:

Comment 3 Brad P. Crochet 2014-10-23 18:45:14 UTC
PR available: https://github.com/theforeman/staypuft/pull/362

Comment 7 Mike Burns 2014-10-24 14:55:25 UTC
internal only bug, no doc text needed.

Comment 8 Alexander Chuzhoy 2014-10-24 17:09:32 UTC
Verified:
rhel-osp-installer-0.4.5-2.el6ost.noarch
ruby193-rubygem-staypuft-0.4.10-1.el6ost.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-8.el6ost.noarch
openstack-foreman-installer-2.0.31-1.el6ost.noarch
openstack-puppet-modules-2014.1-24.el6ost.noarch



The reported issue didn't reproduce.
Able to add a host (only to base_RedHat_7 hostgroup)

Comment 10 errata-xmlrpc 2014-11-04 17:03:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1800.html