Bug 1290391

Summary: Invalid hostname crashes appliance_console
Product: Red Hat CloudForms Management Engine Reporter: luke couzens <lcouzens>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED ERRATA QA Contact: luke couzens <lcouzens>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5.0CC: abellott, jhardy, ncarboni, obarenbo, psavage
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 15:19:19 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 luke couzens 2015-12-10 11:54:46 UTC
Description of problem:Invalid hostname crashes appliance_console


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


How reproducible:100%


Steps to Reproduce:
1.Login to appliance and run appliance_console
2.Select generate Custom Encryption Key (11)
3.Say yes to overwrite existing encryption Key
4.Fetch key from remote machine (2)
5.Fill out appliance details with an unused hostname

Actual results:Appliance console crashes


Expected results:Invalid hostname


Additional info:
/opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `initialize': getaddrinfo: Name or service not known (SocketError)
	from /opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `open'
	from /opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `block in initialize'
	from /opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:74:in `timeout'
	from /opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:125:in `timeout'
	from /opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:67:in `initialize'
	from /opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
	from /opt/rh/cfme-gemset/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
	from /opt/rh/cfme-gemset/gems/net-scp-1.2.1/lib/net/scp.rb:202:in `start'
	from /var/www/miq/vmdb/gems/pending/appliance_console/key_configuration.rb:82:in `fetch_key'
	from /var/www/miq/vmdb/gems/pending/appliance_console/key_configuration.rb:52:in `activate'
	from /var/www/miq/vmdb/gems/pending/appliance_console/key_configuration.rb:44:in `block in ask_question_loop'
	from /var/www/miq/vmdb/gems/pending/appliance_console/key_configuration.rb:42:in `loop'
	from /var/www/miq/vmdb/gems/pending/appliance_console/key_configuration.rb:42:in `ask_question_loop'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:439:in `block in <module:ApplianceConsole>'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:114:in `loop'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:114:in `<module:ApplianceConsole>'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:98:in `<main>'

Comment 1 Nick Carboni 2015-12-10 19:17:16 UTC
https://github.com/ManageIQ/manageiq/pull/5788

Comment 3 CFME Bot 2015-12-11 14:36:16 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8b6ef6911566bff141e3ee4058a371c36de80c44

commit 8b6ef6911566bff141e3ee4058a371c36de80c44
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Dec 10 14:11:46 2015 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Dec 10 14:16:27 2015 -0500

    Rescue the error raised when the user provides an invalid hostname
    
    A SocketError was being raised when the hostname provided was not
    resolvable. This change allows the user to see the error message
    (Name or service not known) and also retry the key fetch.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1290391

 gems/pending/appliance_console/key_configuration.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 4 luke couzens 2016-04-18 13:10:26 UTC
Verified in 5.6.0.1-beta2

Comment 6 errata-xmlrpc 2016-06-29 15:19:19 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://access.redhat.com/errata/RHBA-2016:1348