Bug 1012328 - Broker returns user-unfriendly error messages when Dynect is in maintenance
Broker returns user-unfriendly error messages when Dynect is in maintenance
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Lili Nader
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 05:49 EDT by Zhe Wang
Modified: 2015-05-14 20:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:23:29 EST
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 Zhe Wang 2013-09-26 05:49:34 EDT
Description of problem:
Dynect was in maintenance from September 26, 2013 at 09:00 UTC until 10:00 UTC, causing its APIs to be unavailable. Moreover, the error was actually recorded in development.log:

^[[0;37m2013-09-26 05:01:56.865^[[0m [^[[0;37mDEBUG^[[0m] Retrying dyn_login after exception caught from DNS request: Login failed: Net::HTTPServiceUnavailable (pid:18844)
^[[0;37m2013-09-26 05:01:56.865^[[0m [^[[0;37mDEBUG^[[0m] DYNECT Login with path: /REST/Session/ (pid:18844)
^[[0;37m2013-09-26 05:01:56.955^[[0m [^[[0;37mDEBUG^[[0m] Execute DeregisterDnsOp (pid:8343)
^[[0;37m2013-09-26 05:01:56.969^[[0m [^[[0;37mDEBUG^[[0m] DYNECT Login with path: /REST/Session/ (pid:8343)
^[[0;37m2013-09-26 05:01:57.430^[[0m [^[[0;37mDEBUG^[[0m] Response code: 503 (pid:18844)
^[[0;37m2013-09-26 05:01:57.430^[[0m [^[[0;37mDEBUG^[[0m] Response body: {"status": "failure", "data": {}, "job_id": null, "msgs": [{"INFO": "The Dynect API is currently in maintenance mode.  Please try again later.", "SOURCE": "API-A", "LVL": "ERROR"}]} (pid:18844)
^[[0;37m2013-09-26 05:01:57.439^[[0m [^[[31mERROR^[[0m] Login failed: Net::HTTPServiceUnavailable (pid:18844)

However, the CLI only prompted the following error message when using rhc commands:

Login failed: Net::HTTPServiceUnavailable

which is very technical and user-unfriendly. It would be better if we could return a more readable and specific message.

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

How reproducible:
when Dynect is in maintenance

Steps to Reproduce:
1. Create an app via RHC when Dynect is in maintenance
2.
3.

Actual results:
The creation fails with the error:

[zhe@fedora runtst]$ rhc app create srb8 ruby-1.8
Application Options
-------------------
  Namespace:  test
  Cartridges: ruby-1.8
  Gear Size:  default
  Scaling:    no

Creating application 'srb8' ... Login failed: Net::HTTPServiceUnavailable


Expected results:
It could be better if the error message is more specific and user-friendly.

Additional info:
Comment 1 Lili Nader 2013-10-15 19:08:29 EDT
https://github.com/openshift/li/pull/1999
Comment 3 Zhe Wang 2013-10-18 01:29:01 EDT
The updated exception msg looks good friendly enough, and move the bug to VERIFIED.

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