Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_do_post() errors #6

Open
wallnerryan opened this issue May 6, 2015 · 2 comments
Open

_do_post() errors #6

wallnerryan opened this issue May 6, 2015 · 2 comments

Comments

@wallnerryan
Copy link
Contributor

in the function _do_post() at https://github.com/wallnerryan/scaleio-py/blob/master/scaleiopy/scaleio.py#L497 its hard to understand any error the happens in the stack.

For instance, if we see a runtime error like:

ERROR scaleio:_do_post | _do_post() - HTTP response error, data: {"message":"Only a single SDC may be mapped to this volume at a time","httpStatusCode":500,"errorCode":306}

It is impossible to know that by calling map_volume_to_sdc() because we don't get the response back. My suggestion here is to log the error, but return the response to let the client decipher the errors. Or to have a standard set of errors like CannotMapMultpleSdcsError for the one above, and return the error rather than raise which ends the execution.

again happy to help, but ran into the above situation where all I can get back is _do_post() - Communication error with ScaleIO gateway in a snippet like this:

>>> try:
...     resp = (sio.map_volume_to_sdc(sio.get_volume_by_name('testvol001'), sio.get_sdc_by_ip('192.168.50.12')))
... except Exception as e:
...     print e

@swevm

@swevm
Copy link
Owner

swevm commented May 6, 2015

I'm aware of that. Need to enhance error reporting a bit.

@wallnerryan
Copy link
Contributor Author

thanks, again, just adding issues that I am coming across, I am also happy to help out with bugs and other items as I plan on using this lib in the near future for prototyping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants