[Fix] Improve idempotence of creating MAAS domains

- Need to refresh the local copy of existing domains
  during a deployment so that the same domain is not attempted
  to be created multiple times.

Change-Id: Idb792561690d2014aa2fceb54bf85c8e27cd91db
This commit is contained in:
Scott Hussey 2018-08-28 08:37:22 -05:00
parent b8d4779d58
commit 75009880ff

View File

@ -523,6 +523,7 @@ class CreateNetworkTemplate(BaseMaasAction):
name=n.dns_domain,
authoritative=False)
domain = domains.add(domain)
domains.refresh()
subnet = subnets.singleton({'cidr': n.cidr})