chore: start containerd early in boot

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>
This commit is contained in:
Noel Georgi 2023-11-16 20:11:30 +05:30
parent 95a252cfc9
commit 5c8fa2a803
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
2 changed files with 9 additions and 10 deletions

View File

@ -80,6 +80,7 @@ func (*Sequencer) Initialize(r runtime.Runtime) []runtime.Phase {
).Append(
"machined",
StartMachined,
StartContainerd,
).Append(
"config",
LoadConfig,
@ -105,6 +106,7 @@ func (*Sequencer) Initialize(r runtime.Runtime) []runtime.Phase {
"earlyServices",
StartUdevd,
StartMachined,
StartContainerd,
).Append(
"usb",
WaitForUSB,
@ -161,9 +163,6 @@ func (*Sequencer) Install(r runtime.Runtime) []runtime.Phase {
phases = phases.Append(
"env",
SetUserEnvVars,
).Append(
"containerd",
StartContainerd,
).Append(
"install",
Install,
@ -227,9 +226,6 @@ func (*Sequencer) Boot(r runtime.Runtime) []runtime.Phase {
).Append(
"env",
SetUserEnvVars,
).Append(
"containerd",
StartContainerd,
).Append(
"dbus",
StartDBus,
@ -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(

View File

@ -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),