IBM / ubiquity

Ubiquity
Apache License 2.0
90 stars 26 forks source link

expose the http error reason also to the plugins (provisioner\flex) #230

Closed shay-berman closed 6 years ago

shay-berman commented 6 years ago

This PR improve the ability to troubleshooting Spectrum Connect http issues, so the errors information will be also visible from the provisioner and flex log (and not only in the ubiqutiy server log).

Currently When ubiqutiy gets http error from Spectrum Connect it raises an error and the plugin(e.g provisioner) will show this error in the log. BUT the problem is that ubiqutiy raised only the http error code and NOT the http data, which may includes the reason of the http error.

So this PR fix it and add new error type that also include the http response data, so the plugins will also show it in there logs.

Internal issue -> UB-115

How to test Try to create new PVC on storage class that has no more capacity. Then you should see the full error arrived from Spectrum connect creation fail also in the provisioner log. (not only the http response exit code)


This change is Reviewable

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.2%) to 56.779% when pulling dd94097fbe916d6a936b339ba1aab2a3a74924d0 on fix/donot-hide-http-error-data-from-plugin into 6c55fec3c67bd6ef6c15f904fc1235522d5c3346 on dev.