Hey folks, I was hoping for some input on a case of managing DNS records and multiple domains for machines.
Setup
Machine:
-
machine1
eth1 - subnet1 - 10.0.10.10 (PXE)
eth2 - subnet2 - 10.0.20.20
Domains:
example1.com (default)
example2.com
Subnets:
subnet1 - 10.0.10.0/24 (PXE)
subnet2 - 10.0.20.0/24
Per 2.9.2, deploying a machine generates the following DNS records:
-
A record -
machine1.example1.com -> eth1 - subnet1 - 10.0.10.10 (PXE)
-
PTR record -
10.0.10.10 -> machine1.example1.com
-
A record -
eth2.machine1.example1.com -> eth2 - subnet2 - 10.0.20.20
-
PTR record -
10.0.20.20 -> eth2.machine1.example1.com
Problem
I want to create an A record and corresponding PTR record for this machine in the other non-default domain, example2.com
:
-
A record -
machine1.example2.com -> eth2 - subnet2 - 10.0.20.20
-
PTR record -
10.0.20.20 -> machine1.example2.com
Creating this A record in MAAS works, however the PTR record won’t be automatically generated because it already has the following PTR record for the automatically generated interface.hostname.domain
record:
-
PTR record -
10.0.20.20 -> eth2.machine1.example1.com
I know it’s possible to disable the generation of PTR records in specific subnets (see lp#1634294), but that does not help as I do want PTR records.
Questions
- Is there any way to disable the automatic generation of these
interface.hostname.domain
records? - Is there any way to map interfaces/subnets to different/multiple domains?
- If I want to handle DNS somewhere else, how do I run pre/post machine deployment scripts on a MAAS controller so it can call the DNS API? (I saw the feature suggestion for Pre/Post deployment script and asked for status but haven’t heard back)
- Any other ideas/suggestions on how to approach this?