ETCD docker-compose runtime configuration #17011
-
Hi, I’m pretty new to etcd and I have difficulty finding information about this kind of configuration in docker. I’m not even certain if I what I want to do is even possible. I’m using docker-compose to start a three node cluster of etcd. My node are being attack by a service similar to a choas monkey. The initial configuration seem to be working fine. I can interact with it using dotnet-etcd. The problem is when one of the node restart, it only start etcd in the background but does not join back the cluster. The only thing that kind if helped is the documentation about runtime reconfiguration (https://etcd.io/docs/v3.3/op-guide/runtime-configuration/) but it mainly involve doing manual reconfiguration and not automatic. My question are: Is their a way that to automatically delete node that has become inactive? Also, do I always need to change my environnement variable to rejoin the cluster or I can just keep the same env variable from the initialization of the cluster. thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hey @MatthewComtois - Thanks for your question. Are you using docker volumes to persist the data directory of your etcd members? If not, this could potentially explain why they are not coming back up with the expected configuration after being disrupted by your chaos monkey. For an example of a docker configuration for etcd that uses volumes refer to: #16138 (comment). Just to be clear on why this is important, once an etcd member is restarted, it is definitely expected that it should rejoin whichever cluster it is already a member of provided it gets started with the same data directory it used to have and the right parameters. Feel free to post your docker-compose file if you need more help. |
Beta Was this translation helpful? Give feedback.
-
Hi, I did configure with a volume, but until the whole cluster is down, it doesn't rejoin it. It does a loop with this error saying it has already been bootstrapped. Also, I'm using the arm64 image because I'm running it in Docker with Apple Silicon, but I don't know if it's necessary. etcd1: |
Beta Was this translation helpful? Give feedback.
I think I resolve my problem, I created an image from the etcd docker image that run a check, it validate if the podName is in the cluster. If it find it, it set the - --initial-cluster-state=existing, if not, I set it to new