Skip to content

Instantly share code, notes, and snippets.

@arnaudbos
Last active March 4, 2020 11:12
Show Gist options
  • Save arnaudbos/934a765d827184bdeea2f9b27229a80e to your computer and use it in GitHub Desktop.
Save arnaudbos/934a765d827184bdeea2f9b27229a80e to your computer and use it in GitHub Desktop.
Stuck Workflow
│ init 2020-03-04T10:32:20.505348951Z time="2020-03-04T10:32:20Z" level=info msg="Creating a docker executor" │
│ init 2020-03-04T10:32:20.505383307Z time="2020-03-04T10:32:20Z" level=info msg="Executor (version: vHEAD+unknown, build_date: 2020-02-28T23:35:16Z) initialized (pod: default/exp-02-lpsng-1424268510) with tem │
│ init 2020-03-04T10:32:20.505401758Z time="2020-03-04T10:32:20Z" level=info msg="Start loading input artifacts..." │
│ init 2020-03-04T10:32:20.505405309Z time="2020-03-04T10:32:20Z" level=info msg="Downloading artifact: unzipped" │
│ init 2020-03-04T10:32:20.505408571Z time="2020-03-04T10:32:20Z" level=info msg="S3 Load path: /argo/inputs/artifacts/unzipped.tmp, key: exp-02-lpsng/exp-02-lpsng-733229253/unzipped.tgz" │
│ init 2020-03-04T10:32:20.505411936Z time="2020-03-04T10:32:20Z" level=info msg="Creating minio client argo-artifacts:9000 using static credentials" │
│ init 2020-03-04T10:32:20.505415189Z time="2020-03-04T10:32:20Z" level=info msg="Getting from s3 (endpoint: argo-artifacts:9000, bucket: default-artifacts-bucket, key: exp-02-lpsng/exp-02-lpsng-733229253/unzi │
│ init 2020-03-04T10:32:20.53862485Z time="2020-03-04T10:32:20Z" level=info msg="[tar -tf /argo/inputs/artifacts/unzipped.tmp]" │
│ init 2020-03-04T10:32:20.811320374Z time="2020-03-04T10:32:20Z" level=info msg="tar -xf /argo/inputs/artifacts/unzipped.tmp -C /argo/inputs/artifacts/unzipped.tmpdir" │
│ init 2020-03-04T10:32:21.020242184Z time="2020-03-04T10:32:21Z" level=info msg="Successfully download file: /argo/inputs/artifacts/unzipped" │
│ init 2020-03-04T10:32:21.028270896Z time="2020-03-04T10:32:21Z" level=info msg="Alloc=2402 TotalAlloc=3598 Sys=70528 NumGC=1 Goroutines=6" │
│ wait 2020-03-04T10:32:22.552996711Z time="2020-03-04T10:32:22Z" level=info msg="Creating a docker executor" │
│ wait 2020-03-04T10:32:22.553116415Z time="2020-03-04T10:32:22Z" level=info msg="Executor (version: vHEAD+unknown, build_date: 2020-02-28T23:35:16Z) initialized (pod: default/exp-02-lpsng-1424268510) with tem │
│ wait 2020-03-04T10:32:22.55314199Z time="2020-03-04T10:32:22Z" level=info msg="Waiting on main container" │
│ wait 2020-03-04T10:32:25.40222584Z time="2020-03-04T10:32:25Z" level=info msg="main container started with container ID: c91da8d1e96e79f72bb06867ae107b68368da9af8c6cb0e110f8588649ca1bf1" │
│ wait 2020-03-04T10:32:25.402380019Z time="2020-03-04T10:32:25Z" level=info msg="Starting annotations monitor" │
│ wait 2020-03-04T10:32:25.416322065Z time="2020-03-04T10:32:25Z" level=info msg="docker wait c91da8d1e96e79f72bb06867ae107b68368da9af8c6cb0e110f8588649ca1bf1" │
│ wait 2020-03-04T10:32:25.418498213Z time="2020-03-04T10:32:25Z" level=info msg="Starting deadline monitor" │
│ wait 2020-03-04T10:37:22.555952063Z time="2020-03-04T10:37:22Z" level=info msg="Alloc=2416 TotalAlloc=4845 Sys=70592 NumGC=3 Goroutines=11" │
│ wait 2020-03-04T10:42:22.554365444Z time="2020-03-04T10:42:22Z" level=info msg="Alloc=2417 TotalAlloc=4856 Sys=70592 NumGC=5 Goroutines=11" │
│ wait 2020-03-04T10:47:22.554057441Z time="2020-03-04T10:47:22Z" level=info msg="Alloc=2416 TotalAlloc=4867 Sys=70592 NumGC=8 Goroutines=11" │
│ wait 2020-03-04T10:52:22.554088547Z time="2020-03-04T10:52:22Z" level=info msg="Alloc=2417 TotalAlloc=4877 Sys=70592 NumGC=10 Goroutines=11" │
│ wait 2020-03-04T10:57:22.559795671Z time="2020-03-04T10:57:22Z" level=info msg="Alloc=2416 TotalAlloc=4888 Sys=70592 NumGC=13 Goroutines=11" │
│ wait 2020-03-04T11:02:22.55369151Z time="2020-03-04T11:02:22Z" level=info msg="Alloc=2417 TotalAlloc=4899 Sys=70592 NumGC=15 Goroutines=11" │
│ wait 2020-03-04T11:07:22.554211505Z time="2020-03-04T11:07:22Z" level=info msg="Alloc=2416 TotalAlloc=4910 Sys=70592 NumGC=18 Goroutines=11" │
│ main 2020-03-04T10:32:24.650076182Z total 12 │
│ main 2020-03-04T10:32:24.650127331Z drwxr-xr-x 3 root root 4096 Mar 4 10:32 ./ │
│ main 2020-03-04T10:32:24.650133331Z drwxrwxrwt 1 root root 4096 Mar 4 10:32 ../ │
│ main 2020-03-04T10:32:24.650136552Z drwxrwxr-x 7 root root 4096 Feb 21 06:01 S2A_MSIL1C_20200221T033751_N0209_R061_T52WFD_20200221T052621.SAFE/
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: exp-02-
spec:
entrypoint: exp-02
podGC:
# strategy: OnPodSuccess /!\ Keep the logs to inspect data hops/duplication
arguments:
parameters:
- name: bucket
value: sobloo
- name: path
value: Sentinel-2
artifacts:
- name: exp02-s3-artifact
s3:
endpoint: argo-artifacts.default:9000
insecure: true
bucket: "{{inputs.parameters.bucket}}"
key: "{{inputs.parameters.path}}"
accessKeySecret:
name: argo-artifacts
key: accesskey
secretKeySecret:
name: argo-artifacts
key: secretkey
templates:
- name: exp-02
inputs:
parameters:
- name: bucket
- name: path
artifacts:
- name: exp02-s3-artifact
parallelism: 3
steps:
- - name: list
template: list-products
arguments:
parameters:
- name: bucket
value: "{{inputs.parameters.bucket}}"
- name: path
value: "{{inputs.parameters.path}}"
artifacts:
- name: exp02-s3-artifact
from: "{{inputs.artifacts.exp02-s3-artifact}}"
- - name: prepare
template: prepare-dataset
arguments:
artifacts:
- name: exp02-s3-artifact
from: "{{inputs.artifacts.exp02-s3-artifact}}"
parameters:
- name: bucket
value: "{{inputs.parameters.bucket}}"
- name: path
value: "{{inputs.parameters.path}}/{{item}}"
withParam: "{{steps.list.outputs.result}}"
- - name: train
template: sleep-n-sec
arguments:
parameters:
- name: seconds
value: "5"
- name: features
value: "{{steps.prepare.outputs.parameters.features}}"
- name: prepare-dataset
inputs:
parameters:
- name: bucket
- name: path
artifacts:
- name: exp02-s3-artifact
dag:
tasks:
# Iterate over the list of products listed by the step above
- name: unzip
template: unzip-product
arguments:
parameters:
- name: bucket
value: "{{inputs.parameters.bucket}}"
- name: path
value: "{{inputs.parameters.path}}"
artifacts:
- name: exp02-s3-artifact
from: "{{inputs.artifacts.exp02-s3-artifact}}"
- name: features
dependencies: [unzip]
template: ls
arguments:
artifacts:
- name: unzipped
from: "{{tasks.unzip.outputs.artifacts.unzipped}}"
outputs:
parameters:
- name: features
valueFrom:
parameter: "{{tasks.features.outputs.parameters.features}}"
# artifacts:
# - name: features
# from: "{{tasks.features.outputs.artifacts.features}}"
# Generate a list of products
- name: list-products
inputs:
parameters:
- name: bucket
- name: path
artifacts:
- name: exp02-s3-artifact
path: /sentinel-2
s3:
endpoint: argo-artifacts.default:9000
insecure: true
bucket: "{{inputs.parameters.bucket}}"
key: "{{inputs.parameters.path}}"
accessKeySecret:
name: argo-artifacts
key: accesskey
secretKeySecret:
name: argo-artifacts
key: secretkey
script:
image: python:alpine3.6
command: [python]
source: |
from os import listdir
from os.path import isfile, join
import json
import sys
mypath = "/sentinel-2"
json.dump([f for f in listdir(mypath) if isfile(join(mypath, f))], sys.stdout)
- name: unzip-product
inputs:
parameters:
- name: bucket
- name: path
artifacts:
- name: exp02-s3-artifact
path: /sentinel-2/product.zip
s3:
endpoint: argo-artifacts.default:9000
insecure: true
bucket: "{{inputs.parameters.bucket}}"
key: "{{inputs.parameters.path}}"
accessKeySecret:
name: argo-artifacts
key: accesskey
secretKeySecret:
name: argo-artifacts
key: secretkey
container:
image: python:alpine3.6
command: [sh, -c]
args: ["apk add -U unzip && rm -rf /var/cache/apk/* && mkdir -p /tmp/product && echo Unzipping /sentinel-2/product.zip...; unzip /sentinel-2/product.zip -d /tmp/product; echo done"]
outputs:
artifacts:
- name: unzipped
path: /tmp/product
# Artifact type and parameters ommitted: use default artifact
- name: ls
inputs:
artifacts:
- name: unzipped
path: /tmp/product
# Artifact type and parameters ommitted: use default artifact
container:
image: debian:latest
command: [sh, -c]
args: ["ls -alF /tmp/product > /tmp/features.txt && cat /tmp/features.txt"]
outputs:
# artifacts:
# - name: features
# path: /tmp/features.txt
# # Artifact type and parameters ommitted: use default artifact
parameters:
- name: features
valueFrom:
path: /tmp/features.txt
- name: sleep-n-sec
inputs:
parameters:
- name: seconds
- name: features
container:
image: python:alpine3.6
command: [sh, -c]
args: ["echo sleeping for {{inputs.parameters.seconds}} seconds; sleep {{inputs.parameters.seconds}}; echo aggregated features {{inputs.parameters.features}}; echo done"]
│ NAME↑ IMAGE READY STATE INIT RS PROBES(L:R) PORTS AGE │
│ init argoproj/argoexec:v2.6.0 true Completed true 0 off:off 40m │
│ main debian:latest true Running false 0 off:off 40m │
│ wait argoproj/argoexec:v2.6.0 true Running false 0 off:off 40m │
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment