Translate RootfsPropagation flags from spec to internal config

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-02-02 07:47:59 -08:00
parent c29728a9b0
commit fd63cee703
1 changed files with 9 additions and 0 deletions

View File

@ -560,6 +560,15 @@ func (r *libcontainerRuntime) createLibcontainerConfig(cgroupName, bundlePath st
}
config.Mounts = append(config.Mounts, r.createLibcontainerMount(bundlePath, mp.Path, m))
}
// Convert rootfs propagation flag
if rspec.Linux.RootfsPropagation != "" {
_, pflags, _ := parseMountOptions([]string{rspec.Linux.RootfsPropagation})
if len(pflags) == 1 {
config.RootPropagation = pflags[0]
}
}
if err := r.createDevices(rspec, config); err != nil {
return nil, err
}