Bug 1012328 - Broker returns user-unfriendly error messages when Dynect is in maintenance
Summary: Broker returns user-unfriendly error messages when Dynect is in maintenance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-26 09:49 UTC by Zhe Wang
Modified: 2015-05-15 00:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:23:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zhe Wang 2013-09-26 09:49:34 UTC
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 23:08:29 UTC
https://github.com/openshift/li/pull/1999

Comment 3 Zhe Wang 2013-10-18 05:29:01 UTC
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.