You've already forked directdnsonly
fix: correct RDATA encoding and batch processing in CoreDNS MySQL backend 🐛
- Fix dnspython silently relativizing in-zone FQDN targets to '@' by calling rdata.to_text(origin=origin, relativize=False); CoreDNS MySQL requires absolute FQDNs in RDATA and was serving '.' for any CNAME/MX pointing to the zone apex - Reorder write_zone to delete stale records before inserting new ones so a brief NXDOMAIN is preferred over briefly serving duplicate records - Rework save-queue batch loop: keep batch open until queue is empty rather than closing after a fixed timeout, so sequential DA zone pushes accumulate into a single batch - Add managed_by='directadmin' to _ensure_zone_exists for new and legacy NULL rows
This commit is contained in:
@@ -55,7 +55,9 @@ DA_CLIENT_PATH = "directdnsonly.app.reconciler.DirectAdminClient"
|
||||
|
||||
def _patch_da(return_value):
|
||||
"""Patch DirectAdminClient so list_domains returns a fixed value."""
|
||||
return patch(DA_CLIENT_PATH, **{"return_value.list_domains.return_value": return_value})
|
||||
return patch(
|
||||
DA_CLIENT_PATH, **{"return_value.list_domains.return_value": return_value}
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -233,7 +235,12 @@ def test_heal_skips_domains_without_zone_data(delete_queue, patch_connect):
|
||||
registry, _ = _make_backend_registry(zone_exists_return=False)
|
||||
|
||||
patch_connect.add(
|
||||
Domain(domain="nodata.com", hostname="da1.example.com", username="admin", zone_data=None)
|
||||
Domain(
|
||||
domain="nodata.com",
|
||||
hostname="da1.example.com",
|
||||
username="admin",
|
||||
zone_data=None,
|
||||
)
|
||||
)
|
||||
patch_connect.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user