yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #53391
[Bug 1599187] [NEW] glance-replicator size: Handle no slavetoken case better
Public bug reported:
I think `glance-replicator size` should display a more informative error
message if no token was provided.
Currently it doesn't check for the no token case and then fails with an
HTTP 401 error:
```
$ glance-replicator size az3:9292
2016-07-04 09:58:58.675 31732 CRITICAL glance [-] HTTPUnauthorized: 401 Unauthorized
This server could not verify that you are authorized to access the
document you requested. Either you supplied the wrong credentials (e.g.,
bad password), or your browser does>
2016-07-04 09:58:58.675 31732 ERROR glance Traceback (most recent call last):
...
2016-07-04 09:58:58.675 31732 ERROR glance File "/Users/marca/dev/git-repos/glance/glance/cmd/replicator.py", line 166, in _http_request
2016-07-04 09:58:58.675 31732 ERROR glance explanation=response.read())
2016-07-04 09:58:58.675 31732 ERROR glance HTTPUnauthorized: 401 Unauthorized
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials>
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance
```
I think it would be more user-friendly to display a specific error
message saying that the `slavetoken` is required:
```
$ glance-replicator size az3:9292
2016-07-05 07:36:48.365 69704 CRITICAL glance [-] MissingCredentialError: Missing required credential: slavetoken
...
```
** Affects: glance
Importance: Undecided
Assignee: Marc Abramowitz (msabramo)
Status: In Progress
** Tags: glance-replicator
** Changed in: glance
Assignee: (unassigned) => Marc Abramowitz (msabramo)
** Changed in: glance
Status: New => In Progress
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1599187
Title:
glance-replicator size: Handle no slavetoken case better
Status in Glance:
In Progress
Bug description:
I think `glance-replicator size` should display a more informative
error message if no token was provided.
Currently it doesn't check for the no token case and then fails with
an HTTP 401 error:
```
$ glance-replicator size az3:9292
2016-07-04 09:58:58.675 31732 CRITICAL glance [-] HTTPUnauthorized: 401 Unauthorized
This server could not verify that you are authorized to access the
document you requested. Either you supplied the wrong credentials
(e.g., bad password), or your browser does>
2016-07-04 09:58:58.675 31732 ERROR glance Traceback (most recent call last):
...
2016-07-04 09:58:58.675 31732 ERROR glance File "/Users/marca/dev/git-repos/glance/glance/cmd/replicator.py", line 166, in _http_request
2016-07-04 09:58:58.675 31732 ERROR glance explanation=response.read())
2016-07-04 09:58:58.675 31732 ERROR glance HTTPUnauthorized: 401 Unauthorized
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials>
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance
2016-07-04 09:58:58.675 31732 ERROR glance
```
I think it would be more user-friendly to display a specific error
message saying that the `slavetoken` is required:
```
$ glance-replicator size az3:9292
2016-07-05 07:36:48.365 69704 CRITICAL glance [-] MissingCredentialError: Missing required credential: slavetoken
...
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1599187/+subscriptions
Follow ups