Skip to content

Commit

Permalink
Wait for containerd to be extracted before using it
Browse files Browse the repository at this point in the history
On Windows, the containerd service registration was invoked without
waiting for the binary extraction to complete, potentially causing
errors on the first k0s startup on Windows when the containerd binary is
not yet present on disk.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Jun 10, 2024
1 parent e4ca244 commit f614611
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/component/worker/containerd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ func (c *Component) Init(ctx context.Context) error {
return assets.Stage(c.K0sVars.BinDir, b, constant.BinDirMode)
})
}
if err := g.Wait(); err != nil {
return err
}

if err := c.windowsInit(); err != nil {
return fmt.Errorf("windows init failed: %w", err)
}
return g.Wait()

return nil
}

func (c *Component) windowsInit() error {
Expand Down

0 comments on commit f614611

Please sign in to comment.