since some days I have a strange issue with the LXD DNS server. But first, let me describe my use-case:
I have multiple containers, which are connected to the outside world via an HTTP proxy running NGINX. This proxy dynamically resolves the container hostnames without any caching. So when a container is stopped or started, this is instantly reflected in the web.
Every day, I stop each container, create a snapshot and start it back up. During this time, NGINX correctly responds with an error 502, because it can’t resolve the container hostnames while they are offline. The problem now is: After the container is started again, the LXD DNS still returns no result for the hostname. When I am quick enough, this is reproducible in my live setup. When I query the LXD DNS server, it does not return an IP address for appr. five minutes after container restart.
Could this be an issue in my individual setup, or was there something in the DNS handling changed in recent versions of LXD?
I am using the latest stable snap package on Ubuntu 18.04. Current package version is 8011.