Bug #13692
[arvados-cwl-runner] Improve error message when environment variables missing
100%
Description
I got this:
2018-06-27 16:34:34 arvados.cwl-runner ERROR: 'ARVADOS_API_TOKEN'
as the complete and only error message when I attempted to run arvados-cwl-runner without ARVADOS_API_TOKEN set. We need better error messages.
Similarly, this needs to say what endpoint it's attempting to connect to that it can't verify the cert for:
2018-06-27 16:45:09 arvados.cwl-runner ERROR: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Subtasks
Associated revisions
History
#1
Updated by Tom Clegg over 2 years ago
Just a thought -- in this situation is it possible to raise an exception in the Python SDK that is both machine-readable (recognizable exception class) and human-readable ("you need to set your API_HOST and TOKEN vars or using a settings file")? It'd be nice to handle this such that humans get useful feedback even from applications that haven't wrapped the error with their own advice.
#2
Updated by Peter Amstutz over 2 years ago
- Assigned To set to Peter Amstutz
#3
Updated by Peter Amstutz over 2 years ago
13692-acr-error @ 3a7481703542b0c95d5a23cb45b0d2e7c3ac4c9e
https://ci.curoverse.com/job/developer-run-tests/785/
Improves error messages emitted by the Python SDK, and adds an extra API call early in a-c-r initialization so that errors get reported early.
Example errors:
$ arvados-cwl-runner --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 2018-07-05 17:03:40 arvados.cwl-runner ERROR: ARVADOS_API_TOKEN not set. Please set in /home/peter/.config/arvados/settings.conf or export environment variable.
$ arvados-cwl-runner --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 2018-07-05 17:01:48 arvados.cwl-runner ERROR: Could not connect to https://172.17.0.2:8000/arvados/v1/users/current?alt=json [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) Possible causes: remote SSL/TLS certificate expired, or was issued by an untrusted certificate authority.
#4
Updated by Lucas Di Pentima over 2 years ago
This LGTM, please merge.
#5
Updated by Peter Amstutz over 2 years ago
- Status changed from New to Resolved
- % Done changed from 50 to 100
Applied in changeset arvados|c584cb69cdcfb377deed94745785330562a54ae3.
#6
Updated by Tom Morris over 2 years ago
- Release set to 13
Merge branch '13692-acr-error' closes #13692
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>