Skip to content

Commit

Permalink
fix: move error log and release 0.22.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rainest committed Sep 26, 2022
1 parent 65cad32 commit 78b1222
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v0.22.1

### Fixed

- Moved metallb error recording inside context switch, to avoid
recording the context expiration as the last error.

## v0.22.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion pkg/clusters/addons/metallb/metallb.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ func createIPAddressPool(ctx context.Context, cluster clusters.Cluster, dockerNe
err = res.Delete(ctx, addressPoolName, metav1.DeleteOptions{})
}

lastErr = err
select {
case <-time.After(time.Second):
lastErr = err
continue
case <-ctx.Done():
return fmt.Errorf("failed to create metallb.io/v1beta1 IPAddressPool: %w, last error on create: %v", ctx.Err(), lastErr)
Expand Down

0 comments on commit 78b1222

Please sign in to comment.