No job working after switch to drone-runner-docker

I have running with drone-runner-kube and quite happy with it. And I trust drone is only getting by time :slight_smile: So I try out the latest release by using helm to install both drone server and runner.

However, the result was disappointing. Job is always stuck at pending. Here is my env.

  • Gitea in k8s cluster
  • drone server and runner in k8s cluster.
  • drone file
kind: pipeline
name: amd64
type: kubernetes

platform:
  os: linux
  arch: amd64

steps:
- name: build
  image: rancher/dapper:v0.5.0
  commands:
  - echo "hello world"
  volumes:
  - name: docker
    path: /var/run/docker.sock

  • server logs
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-11-21T23:05:13Z","type":"docker","variant":""}
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2022-11-21T23:05:43Z","type":"docker","variant":""}
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2022-11-21T23:05:43Z","type":"docker","variant":""}
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-11-21T23:05:53Z","type":"docker","variant":""}
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-11-21T23:05:53Z","type":"docker","variant":""}

  • runner log
time="2022-11-21T23:03:03Z" level=trace msg="http: no content returned: re-connect and re-try"
time="2022-11-21T23:03:03Z" level=trace msg="http: no content returned: re-connect and re-try"
time="2022-11-21T23:03:43Z" level=trace msg="http: no content returned: re-connect and re-try"
time="2022-11-21T23:03:43Z" level=trace msg="http: no content returned: re-connect and re-try"
time="2022-11-21T23:04:23Z" level=trace msg="http: no content returned: re-connect and re-try"

hey @liyimeng
Can you take a look at this thread: Builds are Stuck in Pending Status - FAQ - Drone

I have tried that with no luck and now out of clues.

I don’t understand why, but now it work suddenly. I only try to add some debug info. I am curious why cube-runner is dumped. My experience is that kube runner is much better than docker runner.

I have another issue with docker runner now, it seem totally screw up the networking in plugins/docker.

kind: pipeline
name: test

steps:
- name: test
  image: plugins/docker
  pull: if-not-exists
  settings:
    registry: docker.io
    username: testme
    mtu: 1400
    password:
      from_secret: my_pass
    tags:
    - latest
    repo: docker.io/testme/test
    dockerfile: Dockerfile
    context: ./
  when:
    ref:
      include:
      - "refs/heads/td-*"
      - "refs/pull/*/head"
    event: [push, pull_request, tag]

And my dockerfile

FROM alpine:3.16 as builder
RUN ping -c 5 github.com
RUN ping -c 5 google.com

and logs out is like

Step 2/28 : RUN ping -c 5 github.com
30s
113	 ---> Running in 747511d0bdaf
39s
114	PING github.com (155.4.43.83): 56 data bytes
40s
115	64 bytes from 155.4.43.83: seq=0 ttl=61 time=1.255 ms
40s
116	64 bytes from 155.4.43.83: seq=1 ttl=61 time=1.317 ms
41s
117	64 bytes from 155.4.43.83: seq=2 ttl=61 time=1.396 ms
42s
118	64 bytes from 155.4.43.83: seq=3 ttl=61 time=1.378 ms
43s
119	64 bytes from 155.4.43.83: seq=4 ttl=61 time=1.312 ms
44s
120	
44s
121	--- github.com ping statistics ---
44s
122	5 packets transmitted, 5 packets received, 0% packet loss
44s
123	round-trip min/avg/max = 1.255/1.331/1.396 ms
44s
124	Removing intermediate container 747511d0bdaf
45s
125	 ---> e7f2372a6cf0
45s
126	Step 3/28 : RUN ping -c 5 google.com
45s
127	 ---> Running in 25af38b70e6d
45s
128	PING google.com (155.4.43.83): 56 data bytes
46s
129	64 bytes from 155.4.43.83: seq=0 ttl=61 time=1.212 ms
46s
130	64 bytes from 155.4.43.83: seq=1 ttl=61 time=1.271 ms
47s
131	64 bytes from 155.4.43.83: seq=2 ttl=61 time=1.218 ms
48s
132	64 bytes from 155.4.43.83: seq=3 ttl=61 time=1.234 ms
49s
133	64 bytes from 155.4.43.83: seq=4 ttl=61 time=1.291 ms
50s
134	
50s
135	--- google.com ping statistics ---
50s
136	5 packets transmitted, 5 packets received, 0% packet loss
50s
137	round-trip min/avg/max = 1.212/1.245/1.291 ms
50s
138	Removing intermediate container 25af38b70e6d

I will open anther thread for this issue

when switching from the kubernetes to docker runner, you need to update your yaml to ensure the job is routed to the correct runner. If you specify the wrong runner type (and have no runners of that type installed) the job will sit in queue until it eventually reaches the system timeout (default to 24h)

kind: pipeline
name: amd64
-type: kubernetes
+type: docker