Bug 1218289

Summary: UI raises 500 ISE on refreshing facts of a discovered host which is down/poweroff
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, bkearney, ehelms
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/10391
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:15:21 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:
Bug Depends On:    
Bug Blocks: 1193977    
Attachments:
Description Flags
on refreshing facts of unreachable host, raises 500 ISE
none
error notification available on webUI, none

Description Sachin Ghai 2015-05-04 14:00:10 UTC
Created attachment 1021760 [details]
on refreshing facts of unreachable host, raises 500 ISE

Description of problem:
I was trying to refresh the facts of discovered host and UI raises following error. But later I realized the discovered host was already down.

--

Oops, we're sorry but something went wrong
 
Could not get facts from proxy https://dhcp201-172.englab.pnq.redhat.com:9090/discovery/192.168.100.15: 500 Internal Server Error
--


production.log:

2015-05-04 19:26:58 [I] Processing by DiscoveredHostsController#refresh_facts as HTML
2015-05-04 19:26:58 [I]   Parameters: {"id"=>"mac525400ccc513"}
2015-05-04 19:27:01 [W] Operation FAILED: Could not get facts from proxy https://dhcp201-172.englab.pnq.redhat.com:9090/discovery/192.168.100.15: 500 Internal Server Error
2015-05-04 19:27:01 [I]   Rendered common/500.html.erb within layouts/application (5.4ms)
2015-05-04 19:27:01 [I]   Rendered layouts/base.html.erb (1.5ms)
2015-05-04 19:27:01 [I] Completed 500 Internal Server Error in 3128ms (Views: 9.8ms | ActiveRecord: 6.8ms)

Version-Release number of selected component (if applicable):
sat6.1 GA snap2 (Satellite-6.1.0-RHEL-7-20150429.2)

How reproducible:
always

Steps to Reproduce:
1. discovered a host
2. power-it off
3. refresh-facts

Actual results:
500 ISE

Expected results:
UI should raise a decent error without :Oops and 500 ISE

Additional info:

Comment 2 Bryan Kearney 2015-05-06 12:59:33 UTC
Created redmine issue http://projects.theforeman.org/issues/10391 from this bug

Comment 3 Bryan Kearney 2016-02-29 17:10:23 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10391 has been closed
-------------
Lukas Zapletal
Resolved in https://github.com/theforeman/foreman_discovery/pull/251

Comment 4 Sachin Ghai 2016-03-28 09:21:04 UTC
Verified with sat6.2 snap5.1

I can see proper error in production.log on refreshing the facts of discovered host which is not reachable:

[W] ERF50-7522 [Foreman::WrappedException]: Failed to refresh facts for mac5254006ef4b5 with error Could not get facts from proxy https://192.168.100.11:8443: No route to host - connect(2) for "192.168.100.11" port 8443 ([RuntimeError]: Could not get facts from proxy https://192.168.100.11:8443: No route to host - connect(...)


However, no error appears on webUI. I think similar error should appear on webUI too. thanks

Comment 5 Sachin Ghai 2016-04-04 08:16:02 UTC
Verified with sat6.2 beta snap6

I can see error notification on webUI, on refreshing the facts of un-reachable host. Moving this to verified. Please see the screenshot for verification.

Comment 6 Sachin Ghai 2016-04-04 08:17:29 UTC
Created attachment 1143251 [details]
error notification available on webUI,

Comment 8 errata-xmlrpc 2016-07-27 09:15:21 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:1501