argoproj / argoproj/argo-workflows

Hardwired artifacts - `http_proxy` support

Open
#964 4 comments 0 reactions 0 assignees View on GitHub
area/artifacts solution/workaround
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

**Is this a BUG REPORT or FEATURE REQUEST?**: FEATURE REQUEST
**What happened**:
When trying to execute workflows that use hardwired artifacts like git/http - workflow always times out, if the host is behind http_proxy.

**What you expected to happen**:
Successfully created workflow that would download some artifact from internet.

**How to reproduce it (as minimally and precisely as possible)**:
Put your host behind http_proxy and try running example: `input-artifact-git.yaml` or `input-artifact-http.yaml`.

**Anything else we need to know?**:
The workaround for this is to set environment variables http_proxy/https_proxy in the container like:
```yaml
container:
image: golang:1.8
command: [sh, -c]
env:
- name: http_proxy
value: http://:
- name: https_proxy
value: http://:
args: ["
echo $http_proxy;
echo $https_proxy;
git clone https://github.com/argoproj/argo.git
"]
```
and download (for example the argo repo) as an argument in the started container.

**Environment**:
- Argo version:
```
$ argo version
argo: v2.1.1
BuildDate: 2018-05-29T20:39:36Z
GitCommit: ac241c95c13f08e868cd6f5ee32c9ce273e239ff
GitTreeState: clean
GitTag: v2.1.1
GoVersion: go1.9.3
Compiler: gc
Platform: linux/amd64
```

- Kubernetes version :
```
$ kubectl version -o yaml
clientVersion:
buildDate: 2018-01-18T10:09:24Z
compiler: gc
gitCommit: 5fa2db2bd46ac79e5e00a4e6ed24191080aa463b
gitTreeState: clean
gitVersion: v1.9.2
goVersion: go1.9.2
major: "1"
minor: "9"
platform: linux/amd64
serverVersion:
buildDate: 2018-01-18T09:42:01Z
compiler: gc
gitCommit: 5fa2db2bd46ac79e5e00a4e6ed24191080aa463b
gitTreeState: clean
gitVersion: v1.9.2
goVersion: go1.9.2
major: "1"
minor: "9"
platform: linux/amd64
```

**Other debugging information (if applicable)**:
- workflow result: "failed to load artifacts: fatal: unable to access 'https://github.com/argoproj/argo.git/': Failed to connect to github.com port 443: Connection timed out"
```
$ argo get
Name: input-artifact-git-zbgns
Namespace: default
ServiceAccount: default
Status: Pending
Created: Thu Aug 23 00:41:36 -0700 (now)
```
- executor logs:
```
$ kubectl logs -c init
time="2018-08-23T07:41:38Z" level=info msg="Executor (version: v2.1.1) initialized with template:\narchiveLocation:\n s3:\n accessKeySecret:\n key: accesskey\n name: minio-minio-user\n bucket: my-bucket\n endpoint: minio-minio-svc.default:9000\n insecure: true\n key: input-artifact-git-zbgns/input-artifact-git-zbgns\n secretKeySecret:\n key: secretkey\n name: minio-minio-user\ncontainer:\n args:\n - cd /src && git status && ls -l\n command:\n - sh\n - -c\n image: golang:1.8\n name: \"\"\n resources: {}\ninputs:\n artifacts:\n - git:\n repo: https://github.com/argoproj/argo.git\n revision: master\n name: argo-source\n path: /src\nmetadata: {}\nname: git-clone\noutputs: {}\n"
time="2018-08-23T07:41:38Z" level=info msg="Start loading input artifacts..."
time="2018-08-23T07:41:38Z" level=info msg="Downloading artifact: argo-source"
time="2018-08-23T07:41:38Z" level=info msg="git clone https://github.com/argoproj/argo.git /argo/inputs/artifacts/argo-source.tmp"

$ kubectl logs -c wait
Error from server (BadRequest): container "wait" in pod "input-artifact-git-zbgns" is waiting to start: PodInitializing
```
- workflow-controller logs:
```
$ kubectl logs -n kube-system $(kubectl get pods -l app=workflow-controller -n kube-system -o name)
time="2018-08-23T07:41:36Z" level=info msg="Processing workflow" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:36Z" level=info msg="Updated phase -> Running" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:36Z" level=info msg="Created pod: input-artifact-git-zbgns (input-artifact-git-zbgns)" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:36Z" level=info msg="Pod node input-artifact-git-zbgns (input-artifact-git-zbgns) initialized Running" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:36Z" level=info msg="Workflow update successful" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:37Z" level=info msg="Processing workflow" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:41:37Z" level=info msg="Checking for deleted pods" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:44:00Z" level=info msg="Alloc=5385 TotalAlloc=216208 Sys=23662 NumGC=831 Goroutines=50"
time="2018-08-23T07:45:13Z" level=info msg="Processing workflow" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:45:13Z" level=info msg="Updating node input-artifact-git-zbgns (input-artifact-git-zbgns) message: failed to load artifacts: fatal: unable to access 'https://github.com/argoproj/argo.git/
': Failed to connect to github.com port 443: Connection timed out"
time="2018-08-23T07:45:13Z" level=info msg="Updating node input-artifact-git-zbgns (input-artifact-git-zbgns) status Running -> Error"
time="2018-08-23T07:45:13Z" level=info msg="Updated phase Running -> Error" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:45:13Z" level=info msg="Updated message -> failed to load artifacts: fatal: unable to access 'https://github.com/argoproj/argo.git/': Failed to connect to github.com port 443: Connection
timed out" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:45:13Z" level=info msg="Marking workflow completed" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:45:13Z" level=info msg="Workflow update successful" namespace=default workflow=input-artifact-git-zbgns
time="2018-08-23T07:45:14Z" level=info msg="Labeled pod default/input-artifact-git-zbgns completed"
```

Contributor guide

Open the contributing guide

Research direction

Use input-artifact-git.yaml and input-artifact-http.yaml as reproductions; start by tracing the executor logs from “Downloading artifact” and the git clone entry point. Verify that proxy settings are honored for both hardwired artifact types, then rerun the examples and confirm they complete without timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.