I’m currently running into a small issue using nixos-container.
I’m testing out an etcd cluster using nixos-container, and I have a mostly-working configuration:
However, when I import this and run
nixos-rebuild switch, starting the containers take a long time (I was forced to set
timeoutStartSec = "5min"; to work around this). The reason for this was that etcd runs into what seems to be networking issues at startup (e.g.
health check for peer 84d1d2056184ffa could not connect: dial tcp 10.233.0.104:2380: connect: no route to host (prober "ROUND_TRIPPER_SNAPSHOT")), and dies after a certain number of retries (at which point
nixos-rebuild switch recognizes that the containers have finished starting). What’s curious about this is that (simultaneously) restarting etcd on all containers will get etcd working just fine.
My question is, is there some way to get etcd to work at container startup without needing to manually restart etcd on all containers? Is this expected behavior or an issue with nixos-container, the etcd module, or my configuration?