peteeckel / netbox-plugin-dns

NetBox DNS is a NetBox plugin for managing DNS data.
https://pypi.org/project/netbox-plugin-dns
MIT License
204 stars 17 forks source link

Inactive zones may cause erroneous CNAME target warnings #441

Closed peteeckel closed 1 month ago

peteeckel commented 1 month ago

Versions NetBox Version: 4.1.4 NetBox DNS Version: 1.1.4 Python Version: 3.12.5

Describe the bug A CNAME warning may be falsely generated when there is an inactive zone that doesn't have a matching record for a CNAME target.

To Reproduce Steps to reproduce the behavior:

  1. Create an inactive (reseved, parked etc.) zone named zone1.example.com
  2. Create an active zone named zone2.example.com
  3. Create a CNAME record with the value name1.zone1.example.com in zone2.example.com

Expected result There is no warning regarding a missing CNAME target.

Actual result A warning is issued stating that the record name1.zone1.example.com is undefined.

This may or may not be correct, but NetBox DNS is not able to detect an error because there is no zone of that name in the dataset that could contain the record. That means it could be defined in a zone not managed by NetBox DNS, which would make the warning a false positive.

Screenshots

Screenshot 2024-10-18 at 12 02 13