Explicitly wait for all replicas to be ready on bootstrapping. While this should

be the rethinkdb default, I was running into errors sometimes after bootstrapping -
the signer and servers sometimes can't connect after bootstrapping.

Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
Ying Li
2016-05-18 06:14:23 -05:00
parent 9371c49b59
commit 0c552e92a4

View File

@@ -10,7 +10,7 @@ import (
)
// Wait for 60 seconds maximum on Wait() calls for rethink
var timeoutOpt = gorethink.WaitOpts{Timeout: time.Minute.Seconds()}
var timeoutOpt = gorethink.WaitOpts{WaitFor: "all_replicas_ready", Timeout: time.Minute.Seconds()}
func makeDB(session *gorethink.Session, name string) error {
_, err := gorethink.DBCreate(name).RunWrite(session)