add sync_status field to containers table

This commit is contained in:
Pavel Sviderski
2024-11-18 19:50:40 +10:00
parent 54a8b09c9f
commit 2819ba63aa
3 changed files with 11 additions and 3 deletions
+2 -3
View File
@@ -188,16 +188,15 @@ func (nc *networkController) prepareAndWatchDocker(ctx context.Context) error {
}
if err = manager.EnsureUncloudNetwork(ctx, nc.state.Network.Subnet); err != nil {
return err
return fmt.Errorf("ensure Docker network: %w", err)
}
slog.Info("Docker network configured.")
slog.Info("Watching Docker containers and syncing them to the cluster store.")
slog.Info("Watching Docker containers and syncing them to cluster store.")
// Retry to watch and sync containers until the context is done.
boff := backoff.WithContext(backoff.NewExponentialBackOff(
backoff.WithInitialInterval(100*time.Millisecond),
backoff.WithMaxInterval(5*time.Second),
// Retry indefinitely.
backoff.WithMaxElapsedTime(0),
), ctx)
watchAndSync := func() error {