LXD Cluster DNS issue

I’m running LXD 6.2 on Ubuntu 22.04. My initial cluster had three servers and a fan network. I have added 2 more servers to the cluster.

The problem is that when I move a container from one of the original servers to one of the new servers it takes about an hour for the internal dns (the one that handles the .lxd domain) to get updated.

Let’s say my initial servers are s1, s2, and s3 and the new servers are sa and sb.

Here is what I have observed when I move a container between servers:

  • s1 → s2/s3 dns updates immediately
  • s1/s2/s3 → sa/sb dns takes about an hour to update
  • sa → sb dns updates immediately
  • sa/sb → s1/s2/s3 dns updates immediately

Any insight on troubleshooting this and/or fixing it?

Thanks

After some more testing I discovered my initial assumption was incorrect. The problem is not related to original server or new server.

The problem has to do with the dnsmasq.lease for the container not being deleted from the server when the container is moved.

The container from which I am doing a resolvectl query is on a server with this /var/snap/lxd/common/lxd/networks/lxdfan0/forkdns.servers/servers.conf file:

240.205.0.1
240.246.0.1
240.245.0.1
240.244.0.1

If i move a container from the first server in the list to a later server in the list the resolvectl query command returns the ip of the container when it was on the earlier server. If I delete the line for the container from the file: /var/snap/lxd/common/lxd/networks/lxdfan0/dnsmasq.leases on the server then the resolvectl query command returns the correct ip address for the container.

Please can you log a github issue for this

Thanks