Bug 1038680

Summary: [new relic] Improve logging and reporting of 500 errors console gets from the broker
Product: OpenShift Online Reporter: Jessica Forrester <jforrest>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 00:52:12 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:
Bug Depends On:    
Bug Blocks: 1040646    

Description Jessica Forrester 2013-12-05 15:45:32 UTC
Description of problem:
When the console gets a 500 error from the rest API, the console log files report it as ActiveResource::ServerError with a message of "Failed. Response code = 500. Response message = ."  This gives us no information from the console's perspective as to what actually failed.

How reproducible:
always

Steps to Reproduce:
1. service mongod stop    (stop the mongo service so the broker will throw a 500 error)
2. Hit an application page through the mgmt console

Actual results:
console's log file will only report "Failed. Response code = 500. Response message = ."

Expected results:
console log should also report the messages returned from the broker, in this case it should report something like:

Unhandled exception reference #a0ba7d6616fa116b2f428a13327e483a: Unable to complete the requested operation due to: Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>.
Reference ID: 4b04713e328b403d19ff77081098f0b1

Comment 1 Jessica Forrester 2013-12-05 18:06:30 UTC
Fix is in https://github.com/openshift/origin-server/pull/4289

Comment 2 openshift-github-bot 2013-12-05 19:57:44 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b63a147713923bdf89b2ab1fabf78fd3dac2770d
Bug 1038680 - improve console's reporting of 500 errors from rest api

Comment 3 Yujie Zhang 2013-12-06 10:18:10 UTC
Tested on devenv_4102, tried to access the application details page after stopping mongodb, got the expected log as following:

2013-12-06 05:15:43.256 [ERROR] ActiveResource::ServerError (Failed.  Response code = 500.  Response message = .) (pid:3082)
2013-12-06 05:15:43.258 [DEBUG] Server error: Unable to complete the requested operation due to: Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>.
Reference ID: 89c3ac931c6ea0c1e6319b8b1be35a0b (pid:3082)
2013-12-06 05:15:43.258 [ERROR] Unhandled exception reference #26c74b61a04dfd1d1e80334e214518de: Unable to complete the requested operation due to: Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>.
Reference ID: 89c3ac931c6ea0c1e6319b8b1be35a0b

So verify this bug, thanks.