Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server endpoint to know sync state #4099

Closed
sjpotter opened this issue Dec 30, 2015 · 5 comments
Closed

server endpoint to know sync state #4099

sjpotter opened this issue Dec 30, 2015 · 5 comments
Milestone

Comments

@sjpotter
Copy link
Contributor

Currently the restore procedure tells users to do

for node in e{2..3};do
    ssh core@$node "sudo systemctl start etcd2-join.service && sudo systemctl start etcd2.service"
    sleep 10
done

and it sleep to allow the client time to sync, but the note later says to wait until the sync is done and might vary.

could be good to have a etcdctl command that can return the sync status and just loop on that until its ready and then proceed to the next machine.

@xiang90
Copy link
Contributor

xiang90 commented Dec 30, 2015

There is a metrics in kafka called syncLag to determine the rough sync lag duration between follower and leader. We probably can do similar things for etcd.

@sjpotter
Copy link
Contributor Author

So one thing I was wondering. when a node joins the cluster is it able to be used by clients before it finishes its initial sync?

@xiang90
Copy link
Contributor

xiang90 commented Dec 30, 2015

when a node joins the cluster is it able to be used by clients before it finishes its initial sync

It is. But we should probably disable it? See #3879

@sjpotter
Copy link
Contributor Author

ok, then perhaps as part of that have an endpoint (perhaps /ready) that returns if its ready to be used?

@xiang90 xiang90 added this to the v3.0.0 milestone Apr 21, 2016
@xiang90
Copy link
Contributor

xiang90 commented Apr 21, 2016

Now, endpoint status is exposed. User can do endpoint status to check the raft syncing status.

@xiang90 xiang90 closed this as completed Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants