Bug 1012328 - Broker returns user-unfriendly error messages when Dynect is in maintenance
Broker returns user-unfriendly error messages when Dynect is in maintenance
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Lili Nader
libra bugs
Depends On:
  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:
Last Closed: 2014-01-23 22:23:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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):

How reproducible:
when Dynect is in maintenance

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

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
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.