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

Translating pegasus status #1

Open
soichih opened this issue Dec 25, 2019 · 2 comments
Open

Translating pegasus status #1

soichih opened this issue Dec 25, 2019 · 2 comments

Comments

@soichih
Copy link

soichih commented Dec 25, 2019

I am updating our freesurfer App to use the new pegasus workflow version.

For it to function properly on our system, I will need to query and translate pegasus status output to one of the following exit code.

#return code 0 = running
#return code 1 = finished successfully
#return code 2 = failed
#return code 3 = unknown status

I am currently working on the following script

https://github.com/brainlife/app-freesurfer-osg/blob/master/status.sh

My questions are..

  1. What are the possible statuses that pegasus could generate?
  2. Instead of grep/tail-ing the stdout output from pegasus-status (brittle) like I am doing, is there way to make pegasus-status outout in json/xml or any machine readable format?
  3. When I run pegasus-remove, the state become "Failurer". Is this by design? Can the status become "removed" or "stopped" instead?

Thanks!

@rynge
Copy link
Member

rynge commented Jan 14, 2020

The next version of Pegasus will have a better API for this, but for now, yeah, parsing the output of pegasus-status is the best solution. I think --rows might be a little bit easier:

pegasus-status --noqueue --rows /home/rynge/workflows/freesurfer-1578961158 | tail -n 1 | perl -p -e 's/.*\(([\w]+):.*/\1/'

The states here should be Running, Failed, Success, and probably Unknown - but I would just leave that as catch all at the end if the 3 first one does not match.

I will have to check on the removed workflow - it might that we do not have enough states.

@soichih
Copy link
Author

soichih commented Apr 22, 2020

I've updated our script so that we record our stop event and use that to distinguish if the job was stopped by the user, or terminated.

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