Open mcginne opened 6 years ago
I notice here that etcd-operator itself was changed to use a Serializable get -> https://github.com/coreos/etcd-operator/issues/890 , so maybe this adds more weight to the theory the liveness/readiness probe should also..
We have seen issues where the host running the etcd leader has had network issues, so a leader election gets triggered.
For some reason the leader election takes some time to complete, I see messages such as:
I'm wondering if this last message with
[quorum:3]
means that it needs a quorum of 3, but it is only getting 2 votes registered? - at this point etcd-operator tried to add a new member, but the failed one hasn't been removed yet.During the time the leader elections are occurring it appears read requests are taking a long time to complete: e.g.
(These requests normally take a few milliseconds)
So the 2 surviving etcd pods end up being killed because their liveness probes have failed as they do a linearizable read (which I assume is slow as leader election is occurring) - So we lose the whole cluster at this point.
I'm wondering if the liveness probe would be better as a serializable get, as this more accurately reflects the status of the pod that is being checked, and not the etcd cluster as a whole - and I think this would have prevented the cluster being killed when 1 pod failed, as was the case in this instance.
However I noticed in the code where this is set that there is a specific comment about it being linearizable, so I'm wondering if I'm missing something...
https://github.com/coreos/etcd-operator/blob/v0.9.2/pkg/util/k8sutil/pod_util.go#L72-L73