How DNS ip is chosen by juju deploying machines or units?

Hi, and thanks for this great platform.

As i wrote in a previous topic, i’m deployng an HA lxd Openstack using juju (maas 2.7.0-8232 / juju 2.7.6) on 4 multi nic machines.

I would like to specify, adding a new machine into the model (or adding a new unit), wich ip/nic to use for “dns” entry. I can’t find out wich criteria juju is using at the moment.

Thank you very much.

1 Like

DNS/DHCP in the case of the lxd provider is managed by lxd. I can’t directly answer your question, but I might suggest starting with looking into lxc network config to tune your DHCP/DNS configuration for each network. It may be that you want to have lxdbr0 be a “managed” network for all your ${container}.lxd dns needs and unmanage your other networks and manually handle IPs on those interfaces.

apologies, I see you’re using MAAS.

Each NIC on a MAAS metal gets a DNS entry of $nic.$hostname.$MAAS_DOMAIN. the NIC that gets the $hostname.$MAAS_DOMAIN interface is the nic used for enlistment/PXE booting, IIRC.

If your deeper interest is, for instance, having designated DNS entry you can use to hit the active openstack-dashboard lxd unit, then you’ll want to look into setting os-public-hostname, os-internal-hostname, and os-admin-hostname on each charm (keystone, openstack-dashboard, nova-cloud-controller, neutron-api, ceph-radosgw, etc) and set the vip config on each charm to a reserved IP address that you’ve made manual DNS entries for within MAAS DNS or your corporate DNS structure.

As an example, if your os-public-hostname is and your internal is os-internal-hostname =

You’ll need to reserve IP space on your subnets in maas, and then manually create dns entries for both and that point to those reserved IPs. Then on openstack-dashboard set vip=, (assuming those are example public and internal VIPs you’ve reserved).

Thank you very much for reply but, why i can’t see my pxe’s ip under dns conlumn in juju?

As you can see in thoose pictures:
my “148.maas” (A RECORD has the pxe interface and dns record but, when i add this machine to juju, it shows a random space’s ip

Best Regards

That is a wonderful question and one I’ve definitely had in the back of my mind for a while as well. Looking at my own model, it appears the lowest numerically sorted IP gets set as DNS name when using a MAAS cloud provider. I can’t speak to if this is the official logic, but it does appear to be a pattern.

1 Like