After setting debug
snap set lxd daemon.debug=true
snap set lxd daemon.verbose=true
systemctl reload snap.lxd.daemon
And trying again I see in /var/snap/lxd/common/lxd/logs/forkexec.log
Failed to load config file /var/snap/lxd/common/lxd/logs/ams-ceqsttroh003taa8cu10/lxc.conf for /var/snap/lxd/common/lxd/containers/ams-ceqsttroh003taa8cu10
Indeed it appears that lxd.conf is missing at this location for all the containers on this node and the only file present for the other containers is lxc.log
Restarting snap.lxd.daemon appears to restore exec (at least the 1 container we exec’d has its files back) but this also restarts containers which isn’t an option for the user.
Is it possible to prompt LXD to recreate those files? It is at least possible with a service and container restart.
So it looks like that link indicates a full restart of LXD and the containers is required.
Trying to avoid this I tried this based in info documented at [1]
Send SIGQUIT to the lxd daemon
sudo kill -QUIT $(pidof -s lxd)
Start the lxd daemon again.
sudo systemctl start snap.lxd.daemon
According to [1] this should run the startup sequence again where directory structures are checked.
Having tried this, it seems to have a similar effect except now the error message on exec is:
“Error: Instance not found”
Even though the container is listed on the host as running.