From fd63cee703e0aa7451ebd6f36a10ed9d1b785085 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Tue, 2 Feb 2016 07:47:59 -0800 Subject: [PATCH] Translate RootfsPropagation flags from spec to internal config Signed-off-by: Kenfe-Mickael Laventure --- linux/linux.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/linux/linux.go b/linux/linux.go index da22a77..0e84798 100644 --- a/linux/linux.go +++ b/linux/linux.go @@ -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 }