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

Multiple rfc2136-zone updates breaks when updating more than one record at a time in multiple zones #4106

Closed
gregsidelinger opened this issue Dec 12, 2023 · 0 comments · Fixed by #4107
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gregsidelinger
Copy link
Contributor

What happened:
When specifying multiple rfc2136 zones based on the work in #3976 I receive errors if the update msg ever contains records for more than one zone.

What you expected to happen:
Not to receive an error and the records to be created/updated/deleted.

How to reproduce it (as minimally and precisely as possible):
Specify multiply zones with with rfc2136-zone being passed in more than once.

--rfc2136-zone=apps.example.net
--rfc2136-zone=cp.example.net

And then do something that would create a DNS record in each zone at the same time like create an ingress like so.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo
  labels:
    app: demo
spec:
  ingressClassName: default
  rules:
    - host: demo.apps.example.net
      http:
        paths:
          - backend:
              service:
                name: nginx-demo
                port:
                  number: 80
            path: /
            pathType: Prefix
    - host: demo.cp.example.net
      http:
        paths:
          - backend:
              service:
                name: nginx-demo
                port:
                  number: 80
            path: /
            pathType: Prefix

Anything else we need to know?:
This is what the update msg looks like that is being send to my rfc2136 backend. You will notice that the QUESTION SECTION contains my apps.example.net zone but the AUTHORITY SECTION contains records for both zones which is not valid based on my reading of the RFC2136.

;; opcode: UPDATE, status: NOERROR, id: 52974
;; flags:; QUERY: 1, ANSWER: 0, AUTHORITY: 6, ADDITIONAL: 1

;; QUESTION SECTION:
;apps.example.net. IN       SOA

;; AUTHORITY SECTION:
demo.cp.exmaple.net. 0       IN      CNAME   something.example.net.
demo.apps.exmaple.net.       0       IN      CNAME   something.example.net.
_owner-demo.cp.exmaple.net.  0       IN      TXT     \"heritage=external-dns,external-dns/owner=kubernetes.io/cluster/k8scluster,external-dns/resource=ingress/demo/demo\"
_owner-cname-demo.cp.exmaple.net.    0       IN      TXT     \"heritage=external-dns,external-dns/owner=kubernetes.io/cluster/k8scluster,external-dns/resource=ingress/demo/demo\"
_owner-demo.apps.exmaple.net.        0       IN      TXT     \"heritage=external-dns,external-dns/owner=kubernetes.io/cluster/k8scluster,external-dns/resource=ingress/demo/demo\"
_owner-cname-demo.apps.exmaple.net.  0       IN      TXT     \"heritage=external-dns,external-dns/owner=kubernetes.io/cluster/k8scluster,external-dns/resource=ingress/demo/demo\"

;; ADDITIONAL SECTION:

;; TSIG PSEUDOSECTION:
; k8s-apps-rfc2136.     0       CLASS255        TSIG     hmac-sha256. 20231212134823 300 0  52974 0 0

Also if setting --rfc2136-batch-change-size=1 everything works since it never tries to update more than one record at a time so there for it never tries to cross the zone streams when making updates/deletes.

Environment:

  • External-DNS version (use external-dns --version): master
  • DNS provider: rfc2136
  • Others:
@gregsidelinger gregsidelinger added the kind/bug Categorizes issue or PR as related to a bug. label Dec 12, 2023
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.

1 participant