From 69982688f98ae53fa01edc87a95cce9651e4bc1f Mon Sep 17 00:00:00 2001 From: Ishan Tyagi <42602577+ishan16696@users.noreply.github.com> Date: Tue, 2 Jan 2024 19:29:11 +0530 Subject: [PATCH] Closing the ReadinessProbe discussion with GET call using --consistency=linearizable. (#13) (#23) --- docs/concepts/bootstrap.md | 2 +- internal/app/readycheck.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/bootstrap.md b/docs/concepts/bootstrap.md index 6ca09a03..578f0f2c 100644 --- a/docs/concepts/bootstrap.md +++ b/docs/concepts/bootstrap.md @@ -48,7 +48,7 @@ Initiliasation loop exits only when the status returned from `etcd-backup-sideca Start phase mainly comprises of two steps: -1. Set up a readiness probe at `/readyz` where anyone can query to verify if the etcd application is running. +1. Set up a readiness probe at `/readyz` where anyone can query to verify if the etcd application(single node cluster or multi-node cluster) is ready to accept client traffic. 2. Start an embedded etcd using the fetched etcd configuration. diff --git a/internal/app/readycheck.go b/internal/app/readycheck.go index 5a2a9262..5dc448c7 100644 --- a/internal/app/readycheck.go +++ b/internal/app/readycheck.go @@ -85,7 +85,7 @@ func (a *Application) queryAndUpdateEtcdReadiness() { func (a *Application) isEtcdReady() bool { etcdConnCtx, cancelFunc := context.WithTimeout(a.ctx, etcdGetTimeout) defer cancelFunc() - _, err := a.etcdClient.Get(etcdConnCtx, "foo" /*, clientv3.WithSerializable()*/) + _, err := a.etcdClient.Get(etcdConnCtx, "foo") if err != nil { a.logger.Error("failed to retrieve from etcd db", zap.Error(err)) }