1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

manager: error when an alias zone is synced without its source

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2020-11-27 21:36:50 +01:00
parent 66b7ced85c
commit 2b454ccc22
2 changed files with 16 additions and 1 deletions

View File

@@ -375,12 +375,19 @@ class Manager(object):
futures = []
for zone_name, zone_source in aliased_zones.items():
source_config = self.config['zones'][zone_source]
print(source_config)
try:
desired_config = desired[zone_source]
except KeyError:
raise ManagerException('Zone {} cannot be sync without zone '
'{} sinced it is aliased'
.format(zone_name, zone_source))
futures.append(self._executor.submit(
self._populate_and_plan,
zone_name,
[],
[self.providers[t] for t in source_config['targets']],
desired=desired[zone_source],
desired=desired_config,
lenient=lenient
))