mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
runc exec: fix setting process.ioPriority
Commit bfbd0305b added IOPriority field into both Config and Process,
but forgot to add a mechanism to actually use Process.IOPriority.
As a result, runc exec does not set Process.IOPriority 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:
@@ -707,6 +707,7 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
|
||||
AppArmorProfile: c.config.AppArmorProfile,
|
||||
ProcessLabel: c.config.ProcessLabel,
|
||||
Rlimits: c.config.Rlimits,
|
||||
IOPriority: c.config.IOPriority,
|
||||
CreateConsole: process.ConsoleSocket != nil,
|
||||
ConsoleWidth: process.ConsoleWidth,
|
||||
ConsoleHeight: process.ConsoleHeight,
|
||||
@@ -729,6 +730,9 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
|
||||
if len(process.Rlimits) > 0 {
|
||||
cfg.Rlimits = process.Rlimits
|
||||
}
|
||||
if process.IOPriority != nil {
|
||||
cfg.IOPriority = process.IOPriority
|
||||
}
|
||||
|
||||
// Set misc properties.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user