Bug 1117995

Summary: Rubygem-Staypuft: Assigning a host with non-digit characters to a hostgroup in deployment generates an error.
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: rubygem-staypuftAssignee: Petr Chalupa <pchalupa>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.0 (RHEL 7)CC: aberezin, breeler, hbrock, jmontleo, mburns, sclewis, sseago, tsanders
Target Milestone: ga   
Target Release: 5.0 (RHEL 6)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-04 18:35:40 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:
Attachments:
Description Flags
production.log from the staypuft host. none

Description Alexander Chuzhoy 2014-07-09 19:16:36 UTC
Created attachment 916925 [details]
production.log from the staypuft host.

Rubygem-Staypuft:  Assigning a host with non-digit characters to a hostgroup in deployment generates an error.

Environment: rhel-osp-installer-0.1.0-2.el6ost.noarch

Steps to reproduce:
1. Installrhel-osp-installer.
2. Create a new deployment of 3 hosts (1 nova controller + 2 compute nodes)
3. Try to assign a host, where the nodename (not DNX suffix) has non-digits characters to any host group available in that deployment.

Result: Not possible. Get the following error instead:
Error
unknown discovery_bootif fact

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
RuntimeError
unknown discovery_bootif fact
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'


Expected result:
The host should become assigned to the chosen host group.

Comment 3 Tom McKay 2014-07-15 19:22:05 UTC
I am unfamiliar with this area of the code, but it seems like perhaps something in the flow is expecting host IDs and so is validating or otherwise letting them through, after which the value is treated as the host name.

Comment 4 Scott Seago 2014-07-17 16:57:37 UTC
This is a bug in the foreman_discovery plugin gem. There was an upstream bug reported: http://projects.theforeman.org/issues/5589

Upstream fix: https://github.com/theforeman/foreman_discovery/pull/70

This made it into the foreman_discovery 1.3.0 release, but unfortunately we're still on the 1.3.0 rc2 build, which does *not* include this fix.

Comment 5 Scott Seago 2014-07-17 17:16:12 UTC
Upstream rpm which includes the fix: http://yum.theforeman.org/plugins/1.5/el6/x86_64/ruby193-rubygem-foreman_discovery-1.3.0-1.el6.noarch.rpm

Comment 7 Arthur Berezin 2014-07-21 09:49:55 UTC
Are we already consuming the the latest discovery image that includes the fix? if so we might want to ship this with GA2.

Comment 8 Alexander Chuzhoy 2014-07-21 14:46:08 UTC
Verified: rhel-osp-installer-0.1.1-1.el6ost.noarch

Doesn't reproduce.

Comment 12 errata-xmlrpc 2014-08-04 18:35:40 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.

http://rhn.redhat.com/errata/RHEA-2014-1003.html