Allow server to start if one of local nodes in docker/kubernetes setup is resolved (#7452)

Allow server to start if one of the local nodes in docker/kubernetes setup is successfully resolved

- The rule is that we need atleast one local node to work. We dont need to resolve the
  rest at that point.

- In a non-orchestrational setup, we fail if we do not have atleast one local node up
  and running.

- In an orchestrational setup (docker-swarm and kubernetes), We retry with a sleep of 5
  seconds until any one local node shows up.

Fixes #6995
This commit is contained in:
Praveen raj Mani
2019-04-19 22:56:44 +05:30
committed by kannappanr
parent d42496cc74
commit d96584ef58
6 changed files with 150 additions and 76 deletions

View File

@@ -508,6 +508,10 @@ func newStorageRESTHTTPServerClient(t *testing.T) (*httptest.Server, *storageRES
t.Fatalf("NewEndpoint failed %v", endpoint)
}
if err := endpoint.UpdateIsLocal(); err != nil {
t.Fatalf("UpdateIsLocal failed %v", err)
}
registerStorageRESTHandlers(router, EndpointList{endpoint})
restClient, err := newStorageRESTClient(endpoint)
if err != nil {