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

Infoblox provider deletes all fetched records if any DNS record is updated #2931

Closed
snorwin opened this issue Aug 5, 2022 · 4 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@snorwin
Copy link

snorwin commented Aug 5, 2022

What happened:
Updating a DNS record deletes all fetched records. Even if some of the DNS records are afterwards recreated, this leads to major issues. Especially if different external-dns instances manage a DNS zone together or a DNS zone is partly managed manually and by the external-dns controller.

What you expected to happen:
Only the modified DNS record gets deleted and recreated.

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

  1. Create couple of DNS records using the Infoblox API without using external-dns
  2. Create a DNS record using the external-dns controller
  3. Modify the DNS record which was created using the external-dns controller
  4. Check the logs and see that all DNS records were deleted

Anything else we need to know?:
With the upgrade from github.com/infobloxopen/infoblox-go-client v1.1.1 to github.com/infobloxopen/infoblox-go-client/v2 v2.1.1 in f890d88 the BuildRequest changed significantly. The search prams are no longer extracted from the object for GET API calls and therefore need to be set explicitly as query parameters.

-	if obj != nil {	
+	if obj != nil && (t == CREATE || t == UPDATE) {
		bodyStr = wrb.BuildBody(t, obj)
	}

for further details check:
infobloxopen/infoblox-go-client@aa751fa#diff-c1caa8de39e277339469495d65efd1a363c54065c3cc02e7422b097774e56c86

As a result every GET call returns all objects of a given record type instead of one specific object. If the result is then used to delete the object it will delete all objects instead.

Environment:

  • External-DNS version: v0.12.0
  • DNS provider: Infoblox
  • Others: OCP 4.8
@snorwin snorwin added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2022
@snorwin
Copy link
Author

snorwin commented Aug 8, 2022

@skudriavtsev can you maybe have a look at this? I think this is a really serious issue and was already reported in the PR #2890.

@skalpin
Copy link
Contributor

skalpin commented Aug 11, 2022

I was looking at the issue to add infoblox maintainers, and they have a PR that also resolves this issue #2841

It would be nice if the infoblox team could be added so more attention can be given to infoblox PRs

@snorwin
Copy link
Author

snorwin commented Aug 18, 2022

Fixed by #2890.

@snorwin snorwin closed this as completed Aug 18, 2022
@seanhoughton
Copy link

Please issue a release which includes this fix. We just experienced a major outage due to ~4,000 DNS records not managed by external-dns being deleted by it. This is a severe problem and IMHO previous releases which include this bug should be pulled.

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

Successfully merging a pull request may close this issue.

3 participants