Skip to content

Commit

Permalink
chore: start containerd early in boot
Browse files Browse the repository at this point in the history
Start container early in the boot process so system extension services
start in maintenance mode.

Fixes: #7083

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Nov 16, 2023
1 parent 95a252c commit 5c8fa2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 2 additions & 9 deletions internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (*Sequencer) Initialize(r runtime.Runtime) []runtime.Phase {
).Append(
"machined",
StartMachined,
StartContainerd,
).Append(
"config",
LoadConfig,
Expand All @@ -105,6 +106,7 @@ func (*Sequencer) Initialize(r runtime.Runtime) []runtime.Phase {
"earlyServices",
StartUdevd,
StartMachined,
StartContainerd,
).Append(
"usb",
WaitForUSB,
Expand Down Expand Up @@ -161,9 +163,6 @@ func (*Sequencer) Install(r runtime.Runtime) []runtime.Phase {
phases = phases.Append(
"env",
SetUserEnvVars,
).Append(
"containerd",
StartContainerd,
).Append(
"install",
Install,
Expand Down Expand Up @@ -227,9 +226,6 @@ func (*Sequencer) Boot(r runtime.Runtime) []runtime.Phase {
).Append(
"env",
SetUserEnvVars,
).Append(
"containerd",
StartContainerd,
).Append(
"dbus",
StartDBus,
Expand Down Expand Up @@ -434,9 +430,6 @@ func (*Sequencer) MaintenanceUpgrade(r runtime.Runtime, in *machineapi.UpgradeRe
return nil
default:
phases = phases.Append(
"containerd",
StartContainerd,
).Append(
"verifyDisk",
VerifyDiskAvailability,
).Append(
Expand Down
8 changes: 7 additions & 1 deletion internal/app/machined/pkg/system/services/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ func (svc *Extension) Runner(r runtime.Runtime) (runner.Runner, error) {

ociSpecOpts := svc.getOCIOptions(envVars)

debug := false

if r.Config() != nil {
debug = r.Config().Debug()
}

return restart.New(containerd.NewRunner(
r.Config().Debug(),
debug,
&args,
runner.WithLoggingManager(r.Logging()),
runner.WithNamespace(constants.SystemContainerdNamespace),
Expand Down

0 comments on commit 5c8fa2a

Please sign in to comment.