Drone

Image_pull_secrets host name would cause runtime error

It was stuck in the ā€œdefault:Pendingā€ step, the runner log shows runtime errorā€¦

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7cb572]

goroutine 29 [running]:
github.com/drone/runner-go/registry/auths.hostname(...)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/registry/auths/auth.go:113
github.com/drone/runner-go/registry/auths.Parse(0xb3a900, 0xc0004cedc0, 0xc0001bea20, 0xc0004bb140, 0xb46e80, 0xc0000
41500, 0xc00000c1e0)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/registry/auths/auth.go:43 +0
x1d2
github.com/drone/runner-go/registry/auths.ParseString(...)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/registry/auths/auth.go:63
github.com/drone-runners/drone-runner-docker/engine/compiler.(*Compiler).Compile(0xc0002c8b60, 0xb46d40, 0xc0001bea20
, 0xc0004bb140, 0xb46e80, 0xc000041500, 0xc00000c1e0, 0xc00008fb80, 0xc00029e900, 0xc0002c27c0, ...)
        /drone/src/engine/compiler/compiler.go:331 +0x30cf
github.com/drone/runner-go/pipeline/runtime.(*Runner).Run(0xc0002bd560, 0xb46d40, 0xc0001bea20, 0xc00008fb80, 0x0, 0x
0)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/pipeline/runtime/runner.go:2
15 +0x17f0
github.com/drone/runner-go/poller.(*Poller).poll(0xc0002c0ac0, 0xb46c80, 0xc0002c3480, 0x1, 0xc0002d2e48, 0xc000426c0
0)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/poller/poller.go:77 +0x2f0
github.com/drone/runner-go/poller.(*Poller).Poll.func1(0xb46c80, 0xc0002c3480, 0xc0004f2680, 0xc0002c0ac0, 0x0)
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/poller/poller.go:44 +0x53
created by github.com/drone/runner-go/poller.(*Poller).Poll
        /root/go/pkg/mod/github.com/drone/runner-go@v1.5.2-0.20200131074319-316bd38dda3b/poller/poller.go:37 +0xa0
ime="2020-03-27T16:01:11Z" level=debug msg="successfully pinged the docker daemon"
time="2020-03-27T16:01:11Z" level=info msg="starting the server" addr=":3000"
time="2020-03-27T16:01:12Z" level=info msg="successfully pinged the remote server"
time="2020-03-27T16:01:12Z" level=info msg="polling the remote server" arch=amd64 capacity=1 endpoint="https://xxxxxxx" kind=pipeline os=linux type=docker
time="2020-03-27T16:01:12Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-03-27T16:01:42Z" level=trace msg="http: no content returned: re-connect and re-try"
time="2020-03-27T16:02:22Z" level=trace msg="http: no content returned: re-connect and re-try"

My configuration

.drone.yml

image_pull_secrets:
- dockerconfig

Secret value of dockerconfig

{
  "auths": {
    "172.28.0.2:5000": {
      "auth": "xxxxxxxxxxxxxx="
    }
  }
}

But if I changed the host name from 172.28.0.2:5000 to drone.xxxxxx.com, it works fine.

And it was the same error if I changed to use the DRONE_DOCKER_CONFIG.

thanks, fixed by drone/runner-go#437a98da