[fix] Fix create/update opertions if leftover DNS entries are found #424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Currently if an old un-removed DNS A Record is found that matches the name and IP exactly, we look for a TXT record to determine ownership. If TXT record was somehow cleaned in the previous run, controller errors out.
With this fix, if the exact DNS record is found, we leave it alone and push a new TXT record for future updates and deletes.
(This situation arises when we create the cluster with the same name and dns unique id. If the dns record deletion failed on cluster removal, you would see this bug. The IP matches because linode keeps/caches some IPs for the account so you might end up with the same IP being re-assigned)
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs: