Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external-dns 0.14.0 with DynamoDB Registry: panic with large set of records #4271

Closed
willhughes-au opened this issue Feb 21, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@willhughes-au
Copy link

willhughes-au commented Feb 21, 2024

What happened:

We have a number of EKS clusters, each with multiple external-dns deployments.

These deployments have been running successfully for some period using the default TXT registry.

We are in the process of moving over to the DynamoDB registry. Testing was successful on deployments with a small number of zones and small set of records.

When migrating a deployment with 10 zones, and about 300 records, external-dns started crashing with a panic:

panic: runtime error: slice bounds out of range [:25] with capacity 0

goroutine 1 [running]:
sigs.k8s.io/external-dns/registry.(*DynamoDBRegistry).executeStatements(0xc000b982d0, {0x3ddbc28, 0xc001f5e000}, {0xc001cfd080?, 0x0?, 0x0?}, 0xc0020de6a8)
	sigs.k8s.io/external-dns/registry/dynamodb.go:481 +0x305
sigs.k8s.io/external-dns/registry.(*DynamoDBRegistry).ApplyChanges(0xc000b982d0, {0x3ddbc28, 0xc001f5e000}, 0xc001f44120)
	sigs.k8s.io/external-dns/registry/dynamodb.go:286 +0xe51
sigs.k8s.io/external-dns/controller.(*Controller).RunOnce(0xc00191b860, {0x3ddbc60, 0xc000a66370})
	sigs.k8s.io/external-dns/controller/controller.go:250 +0x6fa
sigs.k8s.io/external-dns/controller.(*Controller).Run(0xc00191b860?, {0x3ddbc60, 0xc000a66370})
	sigs.k8s.io/external-dns/controller/controller.go:333 +0xaf
main.main()
	sigs.k8s.io/external-dns/main.go:475 +0x4a4f

This appears to crash on the first batch, as nothing has yet been written to DynamoDB, even after multiple panics.

What you expected to happen:

Should not panic.

How to reproduce it (as minimally and precisely as possible):

Have an existing external-dns deployment configured, with more than 25 records (the DynamoDB Batch size is 25)

Anything else we need to know?:

Environment: EKS Nodes on EC2

  • External-DNS version (use external-dns --version): image registry.k8s.io/external-dns/external-dns:v0.14.0
  • DNS provider: AWS Route53
  • Others: Helm chart version 1.14.3
@willhughes-au willhughes-au added the kind/bug Categorizes issue or PR as related to a bug. label Feb 21, 2024
@jamesmcminn96
Copy link

This was fixed in #4021 but is not yet included in a release.

@willhughes-au
Copy link
Author

This was fixed in #4021 but is not yet included in a release.

Ok, thanks for that confirmation -- given that's quite a while ago, is there any indication on when it'll be released?

@willhughes-au
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants