Skip to content

Instantly share code, notes, and snippets.

@frizop
Created February 22, 2019 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frizop/2c477f6ff94aa8d4ae6b3b2d8a5b1d68 to your computer and use it in GitHub Desktop.
Save frizop/2c477f6ff94aa8d4ae6b3b2d8a5b1d68 to your computer and use it in GitHub Desktop.
still running
(undercloud) [stack@lab-opst-01-b ~]$ WORKFLOW='tripleo.overcloud.workflow_tasks.step2'
(undercloud) [stack@lab-opst-01-b ~]$ UUID=$(mistral execution-list --limit=-1 | grep $WORKFLOW | awk {'print $2'} | tail -1)
if [ -z $UUID ]; then
echo "Error: unable to find UUID. Exixting."
exit 1
fi
for TASK_ID in $(mistral task-list $UUID | awk {'print $2'} | egrep -v 'ID|^$'); do
echo $TASK_ID
mistral task-get $TASK_ID
#mistral task-get-result $TASK_ID | jq . | sed -e 's/\\n/\n/g' -e 's/\\"/"/g'
done
export UUID
export TASK_ID
(undercloud) [stack@lab-opst-01-b ~]$ if [ -z $UUID ]; then
> echo "Error: unable to find UUID. Exixting."
> exit 1
> fi
(undercloud) [stack@lab-opst-01-b ~]$
(undercloud) [stack@lab-opst-01-b ~]$ for TASK_ID in $(mistral task-list $UUID | awk {'print $2'} | egrep -v 'ID|^$'); do
> echo $TASK_ID
> mistral task-get $TASK_ID
> #mistral task-get-result $TASK_ID | jq . | sed -e 's/\\n/\n/g' -e 's/\\"/"/g'
> done
61fab958-0a90-4d77-b2af-564249a84b42
+--------------------+----------------------------------------+
| Field | Value |
+--------------------+----------------------------------------+
| ID | 61fab958-0a90-4d77-b2af-564249a84b42 |
| Name | ceph_base_ansible_workflow |
| Workflow name | tripleo.overcloud.workflow_tasks.step2 |
| Workflow namespace | |
| Execution ID | f44c6f48-a39b-4a2f-a955-6552e3374cd9 |
| State | RUNNING |
| State info | None |
| Created at | 2019-02-22 19:36:03 |
| Updated at | <none> |
+--------------------+----------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment