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:
Kenfe-Mickael Laventure
2017-08-31 13:26:51 -07:00
parent ab0cb4e756
commit 1b79170849
7 changed files with 131 additions and 70 deletions

View File

@@ -118,18 +118,20 @@ func (b *bundle) shimAddress(namespace string) string {
func (b *bundle) shimConfig(namespace string, runcOptions *runcopts.RuncOptions) client.Config {
var (
criuPath string
runtimeRoot string
systemdCgroup bool
)
if runcOptions != nil {
criuPath = runcOptions.CriuPath
systemdCgroup = runcOptions.SystemdCgroup
runtimeRoot = runcOptions.RuntimeRoot
}
return client.Config{
Path: b.path,
WorkDir: b.workDir,
Namespace: namespace,
Criu: criuPath,
RuntimeRoot: runcOptions.RuntimeRoot,
RuntimeRoot: runtimeRoot,
SystemdCgroup: systemdCgroup,
}
}