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

Changing gateway listener with DNSPolicy attached results in orphaned DNS records #794

Closed
azgabur opened this issue Aug 1, 2024 · 4 comments · Fixed by #850
Closed

Changing gateway listener with DNSPolicy attached results in orphaned DNS records #794

azgabur opened this issue Aug 1, 2024 · 4 comments · Fixed by #850
Assignees
Labels
kind/bug Something isn't working

Comments

@azgabur
Copy link

azgabur commented Aug 1, 2024

It is the same issue: Kuadrant/multicluster-gateway-controller#601

After changing Gateway listener from domain specified in Managed zone to a domain specified in different Managed zone the previous DNS record wont get cleaned up and stays in DNS provider.

Steps to reproduce

  1. Have two Managed zones.
  2. Create correctly Gateway, HttpRoute and DnsPolicy.
  3. Edit the Gateway listener so the domain is now under different managed zone.
  4. The DnsPolicy should have status:
'DNSPolicy has encountered some issues: policy is not enforced on any dns record: no routes attached for listeners'

HttpRoute has status:

no hostnames matched parent hostname

DNSRecord CR is deleted and DNS record on provider is NOT deleted.
5. Edit the HttpRoute so it matches the Gateway new listener.
6. Everything reconciles successfully and new hostname works. New DNSRecord CR gets created.
7. Doing DNS lookup on the old hostname will still work.

@azgabur
Copy link
Author

azgabur commented Aug 5, 2024

I found simpler way to reproduce this with just one ManagedZone.

  1. Create Gateway and HttpPolicy to have same hostname (no wildcards)
  2. Create DNSPolicy
  3. Edit Gateway listener to different hostname
  4. Observe the errors in HttpPolicy and DNSPolicy (same as in first post). Observe the DNSRecord gets deleted.
  5. Edit HttpPolicy to the new hostname
  6. Everything reconciles successfuly
  7. DNS query for old hostname still resturns a result.

@mikenairn
Copy link
Member

This should be fixed as part of the managed zone removal Kuadrant/dns-operator#203

@mikenairn
Copy link
Member

This should be fixed as part of the managed zone removal Kuadrant/dns-operator#203

Will be looked into after Kuadrant/dns-operator#203 as we will probably mark the rootHost filed as immutable and delete and re-create the DNSRecord resource in the kuadrant operator instead of handling rootHost changes in the dnsrecord controller.

@azgabur
Copy link
Author

azgabur commented Aug 26, 2024

Yes I can confirm the managed zone removal did not fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants