diff --git a/pkg/lb/lbgrpc/client.go b/pkg/lb/lbgrpc/client.go index 13b90c7..6a2fa66 100644 --- a/pkg/lb/lbgrpc/client.go +++ b/pkg/lb/lbgrpc/client.go @@ -1263,7 +1263,7 @@ func (c *Client) CreateSnapshot( return nil, status.Errorf(codes.Internal, "failed to create snapshot '%s' on LB: %s", name, st.Message()) case codes.FailedPrecondition: - // most likely source volume is being updated, tell + // most likely old snapshot still creating (older Lightbits releases), tell // upper layers to retry the whole thing and // hope the logic above will weed out the bad states so // we don't end up in an infinite loop: @@ -1271,6 +1271,16 @@ func (c *Client) CreateSnapshot( "precondition: %s", st.Message()) return nil, status.Errorf(codes.Unavailable, "create snapshot (%s) transiently failed", name) + case codes.Unavailable: + // most likely old snapshot still creating (newer Lightbits releases), + // volume in updating state, tell + // upper layers to retry the whole thing and + // hope the logic above will weed out the bad states so + // we don't end up in an infinite loop: + c.log.Debugf("create snapshot refused by LB on failed "+ + "unavailable: %s", st.Message()) + return nil, status.Errorf(codes.Unavailable, + "create snapshot (%s) transiently failed", name) } return nil, err }