mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
chore: wait for FailedPrecondition in addition to Unavailable for backward compatibility
This commit is contained in:
1 parent
5308c87651
commit
f6cf73190f
1 file changed
+3
-1
@@ -134,7 +134,9 @@ func (cli *Client) WaitClusterReady(ctx context.Context, timeout time.Duration)
|
||||
listMachines := func() error {
|
||||
_, err := cli.ListMachines(ctx, nil)
|
||||
if err != nil {
|
||||
if s, ok := status.FromError(err); ok && s.Code() == codes.Unavailable {
|
||||
if s, ok := status.FromError(err); ok &&
|
||||
// TODO: remove FailedPrecondition after releading 0.17.
|
||||
(s.Code() == codes.Unavailable || s.Code() == codes.FailedPrecondition) {
|
||||
// Machine is not ready yet, retry.
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user