actions / actions/actions-runner-controller

docker pull fails behind the corporate proxy

Open
#2,599 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

Checks
Controller Version

0.27.4

Helm Chart Version

0.23.3

CertManager Version

0.23.3

Deployment Method

Helm

cert-manager installation

cert-manage works fine and was installed correcly

Checks
  • This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
  • I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
  • My actions-runner-controller version (v0.x.y) does support the feature
  • I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue
  • I've migrated to the workflow job webhook event (if you using webhook driven scaling)
Resource Definitions
kind: RunnerDeployment
metadata:
  name: dependabot-runner-deployment
  namespace: actions-runner-system
spec:
  replicas: 10
  template:
    metadata:
    labels:
       version: main-2023-05-05T13-29-06
    spec:
      containers:
        - env:
            - name: HTTP_PROXY
              valueFrom:
                secretKeyRef:
                  key: http_proxy
                  name: gh-proxy
            - name: HTTPS_PROXY
              valueFrom:
                secretKeyRef:
                  key: http_proxy
                  name: gh-proxy
            - name: NO_PROXY
              valueFrom:
                secretKeyRef:
                  key: no_proxy
                  name: gh-proxy
            - name: http_proxy
              valueFrom:
                secretKeyRef:
                  key: http_proxy
                  name: gh-proxy
            - name: https_proxy
              valueFrom:
                secretKeyRef:
                  key: http_proxy
                  name: gh-proxy
            - name: no_proxy
              valueFrom:
                secretKeyRef:
                  key: no_proxy
                  name: gh-proxy
          image: >-
            ghcr.io/actions/actions-runner-controller/actions-runner-dind:v2.299.1-ubuntu-20.04-aa6dab5
          name: runner
      dockerdWithinRunnerContainer: true
      labels:
        - dependabot-dont-use
      organization: my-gh
To Reproduce
1. RunnerDeployment with dockerdWithinRunnerContainer: true and ghcri.o.com/actions/actions-runner-controller/actions-runner-dind:v2.299.1-ubuntu-20.04-aa6dab5
2. Runner Deployment has the proxy configured in the deployment as we run it behind corporate firewall
3. dockerd is started correctly 
4. docker pull ubuntu
Describe the bug

docker pull from dockerhub / gcr.io etc fails in the action runner is failing with a timeout error.

runner@copy-dependabot-qddrn-dhtxw:/$ docker pull ubuntu
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Looks like dockerd doesn't respect the proxy settings in the RunnerDeployment file. ( note that other operations like downloading from a public site works fine ).

Same works when the rootless image is used and when docker is started as a sidecar.

Tried with a custom entrypoint as well- with latest version of docker and proxy settings in the

Describe the expected behavior

docker pull from public repositories works by consuming the proxy settings.

Whole Controller Logs
https://gist.github.com/vineeth-asml/56df9612c4da218ed6f450562fd0ec32

[ Note that it has logs from relevant period and will contain other runner deployment file logs as well ]
Whole Runner Pod Logs
https://gist.github.com/vineeth-asml/776f8a0c55b2304103773f1108b140c3
Additional Context
image

We are facing this issue in the dind runner with dockerdWithinRunnerContainer: true. But works in rootless and docker sidecar versions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RunnerDeployment manifest and the dockerdWithinRunnerContainer configuration described in the report. Trace how the proxy environment reaches dockerd in the dind runner, comparing it with the working rootless and sidecar setups; done means docker pull succeeds through the corporate proxy.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
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.