Description of problem: If CFME Appliance fqdn is not resolvable, the symptoms may lead user to wrong conclusion as to the cause. Version-Release number of selected component (if applicable): 5.4.1.0.20150717083323_6ed7e1c How reproducible: 100% Steps to Reproduce: 1. Have a CFME appliance with non-resolvable fqdn 2. Define Infrastructure provider 3. Refresh Relationships and Power States 4. Enter Host Credentials 5. Validate Credentials Actual results: User sees flash message on web UI: "Unexpected response returned from system, see log for details" Looking at evm.log, user sees "./evm.log-[----] I, [2015-07-20T15:01:52.156213 #2450:777ea0] INFO -- : host.connect_ssh: Initiating SSH connection to Host:[ibm-x3250m4-05] using [host_fqdn] for user:[root]. Options:[{:remember_host=>false}] ./evm.log-[----] I, [2015-07-20T15:01:52.156392 #2450:777ea0] INFO -- : host.connect_ssh: SSH connection established to [host_fqdn] ./evm.log:[----] E, [2015-07-20T15:01:52.176895 #2450:777ea0] ERROR -- : host.connect_ssh: SSH connection failed for [host_fqdn] with [SocketError: getaddrinfo: Name or service not known] ./evm.log:[----] W, [2015-07-20T15:01:52.177253 #2450:777ea0] WARN -- : MIQ(Host-verify_credentials_with_ssh): #<SocketError: getaddrinfo: Name or service not known> ./evm.log-[----] E, [2015-07-20T15:01:52.177427 #2450:777ea0] ERROR -- : MIQ(host_controller-update): Unexpected response returned from system, see log for details Expected results: Better error message Additional info: The sequence of events could have the user thinking the issue is with the host fqdn when it is actually with the CFME appliance fqdn. Suggestion is to wrap call to MiqSockUtil.getFullyQualifiedDomainName in /var/www/miq/lib/util/MiqSshUtilV2.rb, line 269 in begin/rescue block and emit a more user-friendly error message indicating the problem (see lines 267-268).
Thom, can you suggest a better error message here? I just happen to know that "getaddrinfo" means that there's a DNS or name resolution problem somewhere. I can see how it would be nicer to know who's name can't be resolved. But, I'm not sure what to really convey to the user to help make this easier to diagnose. Thanks!
"SSH connection failed for [host_fqdn] with [SocketError: getaddrinfo: Name or service not known for <host_or_ip_that_failed>]" or "DNS Error: <host_or_ip_that_failed> doesn't resolve properly"
https://github.com/ManageIQ/manageiq/pull/5502 *** This bug has been marked as a duplicate of bug 1278904 ***