reanahub / reana-workflow-engine-cwl

REANA Workflow Engine CWL
http://reana-workflow-engine-cwl.readthedocs.io/
MIT License
5 stars 37 forks source link

logs: missing job details #132

Closed tiborsimko closed 4 years ago

tiborsimko commented 4 years ago

The CWL workflows seem to be missing job log details, IIRC this is connected to one of the past upgrades. We only get the "envelope":

$ reana-client logs -w root6-roofit.cwl
WORKFLOW ENGINE LOGS
{'fitdata.log': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/outputs/fitdata.log', 'basename': 'fitdata.log', 'nameroot': 'fitdata', 'nameext': '.log', 'class': 'File', 'checksum': 'sha1$c670a818ad0b9b99d29370ca7a73dfdd44c4df13', 'size': 7031, 'http://commonwl.org/cwltool#generation': 0}, 'gendata.log': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/outputs/gendata.log', 'basename': 'gendata.log', 'nameroot': 'gendata', 'nameext': '.log', 'class': 'File', 'checksum': 'sha1$54509d86ffd1036b4ad4f93a8f22b4e13d32c221', 'size': 2247, 'http://commonwl.org/cwltool#generation': 0}, 'plot': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/outputs/plot.png', 'basename': 'plot.png', 'nameroot': 'plot', 'nameext': '.png', 'class': 'File', 'checksum': 'sha1$5910569c08cc438083d04adcdbad9a77d59b3660', 'size': 15450, 'http://commonwl.org/cwltool#generation': 0}}

JOB LOGS
job id: 9a66334a-5524-4501-a1f8-341cadecd445
WORKFLOW_UUID: 9da2d45f-557a-4bcf-bf2c-ac79bc46b413
JOB_NAME: gendata
COMPUTE_BACKEND: Kubernetes
BACKEND_JOB_ID: a94711f9-399d-494b-a2a0-1b9c149db967
DOCKER_IMG: reanahub/reana-env-root6:6.18.04
CMD: /bin/sh -c 'umask 2;export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";export HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir";export TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/tmpdir/ohdkdwe9";cp -a /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/code/gendata.C /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir/gendata.C ;mkdir -p /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir && cd /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir && root -b -q '"'"'gendata.C(20000,"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir/data.root")'"'"' > /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir/gendata.log; cp -r /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/docker_outdir/* /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/9da2d45f-557a-4bcf-bf2c-ac79bc46b413/cwl/outdir/myit6ayk'
STATUS: finished
LOGS: job:

without the job log details that should go like:

    ------------------------------------------------------------
  | Welcome to ROOT 6.18/04                  https://root.cern |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for linuxx8664gcc on Jan 08 2020, 14:10:00           |
  | From tags/v6-18-04@v6-18-04                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

Processing code/gendata.C(20000,"results/data.root")...

RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
                Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
                All rights reserved, please read http://roofit.sourceforge.net/license.txt
...
roksys commented 4 years ago

It seems to be a workflow specific issue, stdout is redirected to file https://github.com/reanahub/reana-demo-root6-roofit/blob/master/workflow/cwl/fitdata.cwl#L27