External-dns: panic: assignment to entry in nil map

Created on 4 Oct 2018  路  11Comments  路  Source: kubernetes-sigs/external-dns

Configuring GCS + CloudDNS with nginx-ingress using https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/gke.md

After first record added successfully, I am getting the below errors and external-dns goes into a crash loop.
If I manually remove in CloudDNS external-DNS records the POD recovers on the next restart and crashes again when re-adding the record.
to recover External-DNS have to clear ingress rules and remove DNS records.

external DNS runs with the following arguments:
- --source=service
- --source=ingress
- --domain-filter=dev.getantler.io # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
- --provider=google
- --google-project=
- --registry=txt
- --txt-owner-id=dev
- --txt-prefix=dev-

time="2018-10-03T23:42:09Z" level=info msg="All records are already up to date"
time="2018-10-03T23:43:08Z" level=info msg="Change zone: dev-main-zone"
time="2018-10-03T23:43:08Z" level=info msg="Add records: service1.dev.mydomain. CNAME [service.dev.mydomain.] 300"
time="2018-10-03T23:43:08Z" level=info msg="Add records: dev-service1.dev.mydomain. TXT [\"heritage=external-dns,external-dns/owner=dev,external-dns/resource=ingress/default/nginx\"] 300"

panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/kubernetes-incubator/external-dns/registry.(TXTRegistry).Records(0xc0000f8070, 0xc000000300, 0xc000951828, 0xc00007c960, 0xc000487ec0, 0xc000951828)
/go/src/github.com/kubernetes-incubator/external-dns/registry/txt.go:103 +0x49a
github.com/kubernetes-incubator/external-dns/controller.(
Controller).RunOnce(0xc00006e140, 0xc0009517f8, 0x2)
/go/src/github.com/kubernetes-incubator/external-dns/controller/controller.go:67 +0x49
github.com/kubernetes-incubator/external-dns/controller.(*Controller).Run(0xc00006e140, 0xc00007c960)
/go/src/github.com/kubernetes-incubator/external-dns/controller/controller.go:100 +0x84
main.main()
/go/src/github.com/kubernetes-incubator/external-dns/main.go:238 +0xb0e

kinbug

Most helpful comment

@akozichev It seems Google is the only provider which doesn't initiate labels correctly. I've created a PR which fix it.

All 11 comments

the issues is not there on v0.5.0

On which version do you see it?

I experienced this as well and just had a quick look. It seems it was introduced in v0.5.7-1-g6285b2c, the current teapot/external-dns:latest.

yes, it is latest. sorry I thought I mentioned it

Hello!
I ran into the same issue today with teapot/external-dns:latest
Could you please suggest some workaround? Maybe the tag of stable image?

UPD:
registry.opensource.zalan.do/teapot/external-dns:v0.5.6 works for me.
Thanks.

It seems like there's a bug in the current version, this is fixed in PR https://github.com/kubernetes-incubator/external-dns/pull/739. We will rollout a new version this week.

@njuettner it appears this bug is still present in v0.5.8. Any idea what this might be?

panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/kubernetes-incubator/external-dns/registry.(*TXTRegistry).Records(0xc0000fc0e0, 0x1, 0xc00012d500, 0x0, 0x7fb87056a000, 0xc0004b5768)
    /go/src/github.com/kubernetes-incubator/external-dns/registry/txt.go:103 +0x49a
github.com/kubernetes-incubator/external-dns/controller.(*Controller).RunOnce(0xc000472e40, 0x1d62570, 0xc0004799f0)
    /go/src/github.com/kubernetes-incubator/external-dns/controller/controller.go:67 +0x49
github.com/kubernetes-incubator/external-dns/controller.(*Controller).Run(0xc000472e40, 0xc00007e960)
    /go/src/github.com/kubernetes-incubator/external-dns/controller/controller.go:100 +0x84
main.main()
    /go/src/github.com/kubernetes-incubator/external-dns/main.go:240 +0xb0e

Also got it when upgrading to 0.5.8, 0.5.7 works

To echo the above, 0.5.7 appears to work fine, 0.5.8 sees the issue. Similarly using Nginx Ingress + Google Cloud DNS

@akozichev It seems Google is the only provider which doesn't initiate labels correctly. I've created a PR which fix it.

This issue has been addressed in the latest version of external-dns: https://github.com/kubernetes-incubator/external-dns/releases/tag/v0.5.9

Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings