mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
fix: race on cluster init by waiting for corrosion service to become ready with schema applied
This commit is contained in:
1 parent
3faaac4da7
commit
4166474ee8
5 files changed
+83
-30
No files matched your search
@@ -108,11 +108,13 @@ func (cc *clusterController) Run(ctx context.Context) error {
|
||||
if err := cc.corroService.Restart(ctx); err != nil {
|
||||
return fmt.Errorf("restart corrosion service: %w", err)
|
||||
}
|
||||
slog.Info("Corrosion service restarted.")
|
||||
} else {
|
||||
slog.Info("Starting corrosion service.")
|
||||
if err := cc.corroService.Start(ctx); err != nil {
|
||||
return fmt.Errorf("start corrosion service: %w", err)
|
||||
}
|
||||
slog.Info("Corrosion service started.")
|
||||
}
|
||||
|
||||
errGroup, ctx := errgroup.WithContext(ctx)
|
||||
|
||||
Reference in new issue
Block a user