refactor(corrosion): reduce transport retry time for corrosion 10s->2s, move some logs to error level

This commit is contained in:
Pasha Sviderski
2026-06-24 16:06:00 +10:00
parent a040ce5f8e
commit 9ea30e6ee9
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -606,7 +606,7 @@ func (cc *clusterController) backfillMachineState(ctx context.Context) error {
// syncDockerContainers watches local Docker containers and syncs them to the cluster store.
// TODO: move this to the Docker controller.
func (cc *clusterController) syncDockerContainers(ctx context.Context) error {
// Retry to watch and sync containers until the context is done.
// Supervise the watch-and-sync pipeline until the context is done.
boff := backoff.WithContext(backoff.NewExponentialBackOff(
backoff.WithInitialInterval(100*time.Millisecond),
backoff.WithMaxInterval(5*time.Second),
@@ -614,7 +614,7 @@ func (cc *clusterController) syncDockerContainers(ctx context.Context) error {
), ctx)
watchAndSync := func() error {
if wErr := cc.dockerCtrl.WatchAndSyncContainers(ctx); wErr != nil {
slog.Debug("Failed to watch and sync containers to cluster store, retrying.", "err", wErr)
slog.Error("Failed to watch and sync containers to cluster store, retrying.", "err", wErr)
return wErr
}
return nil