We have two nameservers in our company, both reachable via ip or name. Today I did some work on this nameservers and I have to restart them serval times and there were longer downtimes, but one of both servers was always available. Allthough I thought this setup with both nameserver is redundant and I had no problems with this setup before some problems came up :-(.
On our PVE clusters both nameservers are stored in /etc/resolv.conf. If the second nameserver is ofline all is fine, but if the first nameserver in the list is not available nameresolution on the cluster was problematic somehow. It did work after querying the first server timet out, but some things ran in timeouts, e.g. replication jobs. We use systemd resolver on our VMs and there it is no problem if one of the nameservers is away and now I wonder if I could install and configure systemd resolver also on our PVE cluster nodes. Has anyone done this and how does it work? Will it cause problems e.g. when updating the cluster? Are there any other things I could do to make sure that namerelolution will work better if the first nameserver in resolv.conf is not reachable?
Another question is related to the configuration of our virtual machines. In each config file stored in /etc/pve/qemu there is a nameserver setting, e.g.:
nameserver: 10.10.10.2
Where and when is this setting used? I know that this nameserver is used after cloning a templating and start the VM the first time, but is it also used if dhcp addresses are used for a VM? Normaly the procedure setting up new VMs is the following for us:
#1 Clone a new VM from a template.
#2 Set a fixed ip address for the new VM and do other stuff related to the VM config.
#3 Start the VM the first time. At this point the nameserver from the VM config is used.
#4 Use cloud-init to perform the initial VM configuration. At this point cloud-init fails, e.g. when packages are retrived, if the nameserver is not reachable.
#5 Reboot the VM.
#6 Do the rest of the configuration via ansible. Here I configure both nameservers and systemd resolver.
The problem is #4. We use no cloud-init network configuration, but would it make sense to have such a config to give the VMs ip settings and configure also both nameservers?
Is it possible to configure a list of nameservers in the VMs config file or can only one nameserver be configured there?
How do you handle your nameserver setup? What are best practices regarding nameresolution for PVE clusters and the VMs running on such clusters? Is the best solution using a loadballancer in front of our different nameservers and configure the loadballancers ip address on our systems instead using different nameserver ip addresses?
On our PVE clusters both nameservers are stored in /etc/resolv.conf. If the second nameserver is ofline all is fine, but if the first nameserver in the list is not available nameresolution on the cluster was problematic somehow. It did work after querying the first server timet out, but some things ran in timeouts, e.g. replication jobs. We use systemd resolver on our VMs and there it is no problem if one of the nameservers is away and now I wonder if I could install and configure systemd resolver also on our PVE cluster nodes. Has anyone done this and how does it work? Will it cause problems e.g. when updating the cluster? Are there any other things I could do to make sure that namerelolution will work better if the first nameserver in resolv.conf is not reachable?
Another question is related to the configuration of our virtual machines. In each config file stored in /etc/pve/qemu there is a nameserver setting, e.g.:
nameserver: 10.10.10.2
Where and when is this setting used? I know that this nameserver is used after cloning a templating and start the VM the first time, but is it also used if dhcp addresses are used for a VM? Normaly the procedure setting up new VMs is the following for us:
#1 Clone a new VM from a template.
#2 Set a fixed ip address for the new VM and do other stuff related to the VM config.
#3 Start the VM the first time. At this point the nameserver from the VM config is used.
#4 Use cloud-init to perform the initial VM configuration. At this point cloud-init fails, e.g. when packages are retrived, if the nameserver is not reachable.
#5 Reboot the VM.
#6 Do the rest of the configuration via ansible. Here I configure both nameservers and systemd resolver.
The problem is #4. We use no cloud-init network configuration, but would it make sense to have such a config to give the VMs ip settings and configure also both nameservers?
Is it possible to configure a list of nameservers in the VMs config file or can only one nameserver be configured there?
How do you handle your nameserver setup? What are best practices regarding nameresolution for PVE clusters and the VMs running on such clusters? Is the best solution using a loadballancer in front of our different nameservers and configure the loadballancers ip address on our systems instead using different nameserver ip addresses?