Project

General

Profile

Actions

Bug #13692

closed

[arvados-cwl-runner] Improve error message when environment variables missing

Added by Tom Morris almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release:
Release relationship:
Auto

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 2 (0 open2 closed)

Task #13727: Catch Arvados exceptionsResolvedPeter Amstutz07/06/2018Actions
Task #13728: Review 13692-acr-errorResolvedPeter Amstutz07/06/2018Actions
Actions #1

Updated by Tom Clegg over 5 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.

Actions #2

Updated by Peter Amstutz over 5 years ago

  • Assigned To set to Peter Amstutz
Actions #3

Updated by Peter Amstutz over 5 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.
Actions #4

Updated by Lucas Di Pentima over 5 years ago

This LGTM, please merge.

Actions #5

Updated by Peter Amstutz over 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 50 to 100
Actions #6

Updated by Tom Morris over 5 years ago

  • Release set to 13
Actions

Also available in: Atom PDF