Fix garage health check to wait for full replication factor of nodes

This commit is contained in:
Brian Picciano 2024-10-31 13:13:17 +01:00
parent 2cdec586b2
commit 6ac473edcb

View File

@ -153,7 +153,7 @@ func (c *AdminClient) do(
} }
// Wait will block until the instance connected to can see at least // Wait will block until the instance connected to can see at least
// ReplicationFactor-1 other garage instances. If the context is canceled it // ReplicationFactor other garage instances. If the context is canceled it
// will return the context error. // will return the context error.
func (c *AdminClient) Wait(ctx context.Context) error { func (c *AdminClient) Wait(ctx context.Context) error {
@ -193,7 +193,7 @@ func (c *AdminClient) Wait(ctx context.Context) error {
"numUp", numUp, "numUp", numUp,
) )
if numUp >= ReplicationFactor-1 { if numUp >= ReplicationFactor {
c.logger.Debug(ctx, "instance appears to be online") c.logger.Debug(ctx, "instance appears to be online")
return nil return nil
} }