I'm trying to create a AWS AutoScaling configuration to fully automate rolling upgrades of my consul nodes. The idea is that the ASG will terminate one instance, create a new one and wait with the next one until I signal success for the first one.
Now I need to know when a consul server node successfully joined the cluster (-> has all state and is part of the cluster), aka when it's save to kill another server node, so I can signal success.
I might be able to check if the node is in /v1/status/peers but I'm not sure this goes through the raft log and is guaranteed to be consistent. Or I assume that a node sucesffully joined as soon as /v1/status/leader returns something, but same here - I'm not sure about the consistency guarantees.
So if there is a way to programatically tell that a node successfully joined it should be documented. If not, I think it would be useful to have a API endpoint for that.
The text was updated successfully, but these errors were encountered:
@armon Great, thanks! I think this should be documented? I'd say this is a concern everyone who is replacing nodes in the cluster automatically has. But I'm good, so feel free to close this ticket if you want.
Use /tmp/scripts folder instead of the WORKDIR which is / to avoid getting permission denied errors when security context defaults to the non-root user
duckhan
pushed a commit
to duckhan/consul
that referenced
this issue
Oct 24, 2021
Hi,
I'm trying to create a AWS AutoScaling configuration to fully automate rolling upgrades of my consul nodes. The idea is that the ASG will terminate one instance, create a new one and wait with the next one until I signal success for the first one.
Now I need to know when a consul server node successfully joined the cluster (-> has all state and is part of the cluster), aka when it's save to kill another server node, so I can signal success.
I might be able to check if the node is in /v1/status/peers but I'm not sure this goes through the raft log and is guaranteed to be consistent. Or I assume that a node sucesffully joined as soon as /v1/status/leader returns something, but same here - I'm not sure about the consistency guarantees.
So if there is a way to programatically tell that a node successfully joined it should be documented. If not, I think it would be useful to have a API endpoint for that.
The text was updated successfully, but these errors were encountered: