From 2a99bd922fa71162ccf83f8222c22beb130e0726 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Tue, 20 Jun 2023 07:41:38 -0700 Subject: [PATCH 1/3] Always add ownership flatting records with lenient=True This is intened to address cases where NS delegation ownership records are added to the parent zone when they technically should live in the delegated child. They're only used as ~metadata so this is fine, so long as the provider supports it. --- octodns/processor/ownership.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/octodns/processor/ownership.py b/octodns/processor/ownership.py index 3323019..ed8f34a 100644 --- a/octodns/processor/ownership.py +++ b/octodns/processor/ownership.py @@ -32,7 +32,9 @@ class OwnershipProcessor(BaseProcessor): name, {'type': 'TXT', 'ttl': 60, 'value': self.txt_value}, ) - desired.add_record(txt) + # add these w/lenient to cover the case when the ownership record + # for a NS delegation record should technically live in the subzone + desired.add_record(txt, lenient=True) return desired From d370e3256b2f090cd1c31d1f28bc5ffda2abd882 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Tue, 20 Jun 2023 09:18:57 -0700 Subject: [PATCH 2/3] Support --leient flag for report cmd --- octodns/cmds/report.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/octodns/cmds/report.py b/octodns/cmds/report.py index 281f875..80de6b0 100755 --- a/octodns/cmds/report.py +++ b/octodns/cmds/report.py @@ -46,6 +46,12 @@ def main(): parser.add_argument( '--timeout', default=1, help='Number seconds to wait for an answer' ) + parser.add_argument( + '--lenient', + action='store_true', + default=False, + help='Ignore record validations and do a best effort dump', + ) parser.add_argument('server', nargs='+', help='Servers to query') args = parser.parse_args() @@ -61,7 +67,7 @@ def main(): zone = manager.get_zone(args.zone) for source in sources: - source.populate(zone) + source.populate(zone, lenient=args.lenient) servers = ','.join(args.server) print(f'name,type,ttl,{servers},consistent') From 3ce2c59b1a56e1a4a1121422051efe1d581fd9c2 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Tue, 20 Jun 2023 09:21:10 -0700 Subject: [PATCH 3/3] changelog entry for ownership and report lenient --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c78c4e..b9bbf10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ## v1.0.0.rc2 - 2023-??-?? - * Record and Zone validation now ensures there's no whitespace in names +* OwnershipProcessor managed records always add w/lenient=True, this allows + ownership to be marked in the same zone for delegation NS records. +* octodns-report access --lenient flag to allow running reports with records + sourced from providers with non-compliant record data. ## v1.0.0.rc0 - 2023-05-16 - First of the ones