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

CASMNET-2122 - cray-externaldns-manager crashes when used with external-dns 0.13 #2388

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

spillerc-hpe
Copy link
Contributor

Summary and Scope

External DNS changed the format of their TXT records in version 0.12. The TXT record now contains a prefix indicating the record type e.g. a-foo.example.com which means it no longer directly matches the corresponding A record.

A second bug was also identified where the allZones slice was being sorted while being iterated over which messed up zone processing and caused some zones to get processed twice and others not at all.

Issues and Related PRs

Testing

Tested on:

  • Local development environment
  • Ashton
    • Tested using the following
      • Helm chart: cray-externaldns 1.5.0-20230511191813+6f5436c
      • Image: artifactory.algol60.net/csm-docker/stable/docker.io/bitnami/external-dns 0.13.4-debian-11-r14

Test description:

  • Verified externaldns-manager no longer crashes when a new format external-dns record is encountered.

     {"level":"debug","ts":1687252356.671869,"msg":"Found new format registry record","rrSet":{"name":"a-capsules.chn.surtur.hpc.amslabs.hpecorp.net.","type":"TXT","ttl":300,"records":[{"content":"\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/services/cray-oauth2-proxies-customer-high-speed-ingress\"","disabled":false}]}}
     {"level":"debug","ts":1687252356.6718771,"msg":"Found corresponding A record","name":"capsules.chn.surtur.hpc.amslabs.hpecorp.net.","ip":"10.102.67.225"}
     {"level":"debug","ts":1687252356.6719182,"msg":"Generating PTR record","ipaddr":"225.67.102.10.in-addr.arpa"}
     {"level":"debug","ts":1687252356.6719282,"msg":"Record already exits, nothing to do","rrSetReverse":{"name":"225.67.102.10.in-addr.arpa.","type":"PTR","ttl":3600,"changetype":"REPLACE","records":[{"content":"capsules.chn.surtur.hpc.amslabs.hpecorp.net.","disabled":false}]}}
    
  • Verified each zone is processed and is only processed once

    {"level":"debug","ts":1687252491.455631,"msg":"Processing zone","zone":"hmnlb.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.455915,"msg":"Processing zone","zone":"nmnlb.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.4560719,"msg":"Processing zone","zone":"hsn.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.45608,"msg":"Processing zone","zone":"cmn.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.456852,"msg":"Processing zone","zone":"nmn.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.456855,"msg":"Processing zone","zone":"mtl.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.456897,"msg":"Processing zone","zone":"chn.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.457124,"msg":"Processing zone","zone":"hmn.surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.4571269,"msg":"Processing zone","zone":"surtur.hpc.amslabs.hpecorp.net."}
    {"level":"debug","ts":1687252491.457129,"msg":"Processing zone","zone":"100.92.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457132,"msg":"Processing zone","zone":"67.102.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457251,"msg":"Processing zone","zone":"100.94.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.4572532,"msg":"Processing zone","zone":"107.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457255,"msg":"Processing zone","zone":"106.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457257,"msg":"Processing zone","zone":"252.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457259,"msg":"Processing zone","zone":"254.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457261,"msg":"Processing zone","zone":"253.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457263,"msg":"Processing zone","zone":"1.10.in-addr.arpa."}
    {"level":"debug","ts":1687252491.457265,"msg":"Processing zone","zone":"hmnlb."}
    {"level":"debug","ts":1687252491.457267,"msg":"Processing zone","zone":"nmnlb."}
    {"level":"debug","ts":1687252491.457269,"msg":"Processing zone","zone":"cmn."}
    {"level":"debug","ts":1687252491.457271,"msg":"Processing zone","zone":"nmn."}
    {"level":"debug","ts":1687252491.457273,"msg":"Processing zone","zone":"mtl."}
    {"level":"debug","ts":1687252491.457275,"msg":"Processing zone","zone":"hmn."}
    {"level":"debug","ts":1687252491.4572759,"msg":"Processing zone","zone":"chn."}
    {"level":"debug","ts":1687252491.457278,"msg":"Processing zone","zone":"hsn."}
    

Risks and Mitigations

Pull Request Checklist

  • Version number(s) incremented, if applicable
  • Copyrights updated
  • License file intact
  • Target branch correct
  • CHANGELOG.md updated
  • Testing is appropriate and complete, if applicable
  • HPC Product Announcement prepared, if applicable

@spillerc-hpe spillerc-hpe requested a review from a team as a code owner June 20, 2023 15:39
@spillerc-hpe
Copy link
Contributor Author

/backport stable/1.5

@github-actions
Copy link

Error occured while backporting into branch stable/1.5.

Error
git -c user.name="Chris Spiller" -c user.email="[email protected]" cherry-pick 0ab365b2f112d2ccacd1243bc3f74f8c9d9a5f9f -x
Auto-merging CHANGELOG.md
CONFLICT (content): Merge conflict in CHANGELOG.md
Auto-merging manifests/platform.yaml

error: could not apply 0ab365b... CASMNET-2122 - cray-externaldns-manager crashes when used with external-dns 0.13
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@gbaker-hpe gbaker-hpe merged commit 4299fae into main Jun 20, 2023
1 check passed
@gbaker-hpe gbaker-hpe deleted the CASMNET-2122 branch June 20, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants