Bug 1290391 - Invalid hostname crashes appliance_console
Invalid hostname crashes appliance_console
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.6.0
Assigned To: Nick Carboni
luke couzens
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-10 06:54 EST by luke couzens
Modified: 2016-06-29 11:19 EDT (History)
5 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:19:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description luke couzens 2015-12-10 06:54:46 EST
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 14:17:16 EST
https://github.com/ManageIQ/manageiq/pull/5788
Comment 3 CFME Bot 2015-12-11 09:36:16 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8b6ef6911566bff141e3ee4058a371c36de80c44

commit 8b6ef6911566bff141e3ee4058a371c36de80c44
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Thu Dec 10 14:11:46 2015 -0500
Commit:     Nick Carboni <ncarboni@redhat.com>
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 09:10:26 EDT
Verified in 5.6.0.1-beta2
Comment 6 errata-xmlrpc 2016-06-29 11:19:19 EDT
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

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