runc exec: fix setting process.Scheduler

Commit 770728e1 added Scheduler field into both Config and Process,
but forgot to add a mechanism to actually use Process.Scheduler.
As a result, runc exec does not set Process.Scheduler ever.

Fix it, and a test case (which fails before the fix).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2025-01-08 14:11:02 -08:00
parent b9114d91e2
commit 99f9ed94dc
7 changed files with 52 additions and 11 deletions
+4
View File
@@ -708,6 +708,7 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
ProcessLabel: c.config.ProcessLabel,
Rlimits: c.config.Rlimits,
IOPriority: c.config.IOPriority,
Scheduler: c.config.Scheduler,
CreateConsole: process.ConsoleSocket != nil,
ConsoleWidth: process.ConsoleWidth,
ConsoleHeight: process.ConsoleHeight,
@@ -733,6 +734,9 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
if process.IOPriority != nil {
cfg.IOPriority = process.IOPriority
}
if process.Scheduler != nil {
cfg.Scheduler = process.Scheduler
}
// Set misc properties.