linux: Add RuntimeRoot to RuncOptions
This allow specifying wher the OCI runtime should store its state data. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -93,6 +93,9 @@ func newCommand(binary, daemonAddress string, debug bool, config Config, socket
|
||||
if config.Criu != "" {
|
||||
args = append(args, "--criu-path", config.Criu)
|
||||
}
|
||||
if config.RuntimeRoot != "" {
|
||||
args = append(args, "--runtime-root", config.RuntimeRoot)
|
||||
}
|
||||
if config.SystemdCgroup {
|
||||
args = append(args, "--systemd-cgroup")
|
||||
}
|
||||
@@ -182,6 +185,7 @@ type Config struct {
|
||||
Namespace string
|
||||
WorkDir string
|
||||
Criu string
|
||||
RuntimeRoot string
|
||||
SystemdCgroup bool
|
||||
}
|
||||
|
||||
|
||||
@@ -94,13 +94,13 @@ func (s *Service) newInitProcess(context context.Context, r *shimapi.CreateTaskR
|
||||
}
|
||||
}
|
||||
runtime := &runc.Runc{
|
||||
Command: r.Runtime,
|
||||
Log: filepath.Join(s.config.Path, "log.json"),
|
||||
LogFormat: runc.JSON,
|
||||
PdeathSignal: syscall.SIGKILL,
|
||||
Root: filepath.Join(RuncRoot, s.config.Namespace),
|
||||
Criu: s.config.Criu,
|
||||
// SystemdCgroup: s.config.SystemdCgroup,
|
||||
Command: r.Runtime,
|
||||
Log: filepath.Join(s.config.Path, "log.json"),
|
||||
LogFormat: runc.JSON,
|
||||
PdeathSignal: syscall.SIGKILL,
|
||||
Root: filepath.Join(s.config.RuntimeRoot, s.config.Namespace),
|
||||
Criu: s.config.Criu,
|
||||
SystemdCgroup: s.config.SystemdCgroup,
|
||||
}
|
||||
p := &initProcess{
|
||||
id: r.ID,
|
||||
|
||||
Reference in New Issue
Block a user