|
|
|
@ -130,7 +130,12 @@ func (c *AdminClient) Do( |
|
|
|
|
// ReplicationFactor-1 other garage instances. If the context is canceled it
|
|
|
|
|
// will return the context error.
|
|
|
|
|
func (c *AdminClient) Wait(ctx context.Context) error { |
|
|
|
|
for { |
|
|
|
|
|
|
|
|
|
for first := true; ; first = false { |
|
|
|
|
|
|
|
|
|
if !first { |
|
|
|
|
time.Sleep(250 * time.Millisecond) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var clusterStatus struct { |
|
|
|
|
KnownNodes map[string]struct { |
|
|
|
@ -159,6 +164,5 @@ func (c *AdminClient) Wait(ctx context.Context) error { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
time.Sleep(250 * time.Millisecond) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|