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

Check whether dns_name set before running post_clean on IP addresses #489

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

peteeckel
Copy link
Owner

fixes #488

This PR fixes an issue with the validation of DNS names for IP addresses with DNSsync.

When bulk-importing a duplicate IP address that would violate a uniqueness constraint (either set per prefix or via ENFORCE_GLOBAL_UNIQUE), the post_clean handler for NetBox DNS is apparently run before the duplicate check in NetBox is executed. This causes NetBox DNS to check for duplicate address records, and even if the DNS name is empty for the duplicate records this will result in an error message stating that there are duplicate records for the IP address.

This is OK if DNS names have actually been set and are the same, but if there are none the error message is erroneous and should not be raised as it covers the real reason for the failed import.

@peteeckel peteeckel merged commit 7df79c1 into main Nov 26, 2024
10 checks passed
@peteeckel peteeckel deleted the fix/duplicate-address-error branch November 26, 2024 15:10
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.

Erroneous DNS error message for duplicate IP addresses
1 participant