summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/fs.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-07-03 12:00:09 -0700
committerShentubot <shentubot@google.com>2018-07-03 12:01:09 -0700
commit52ddb8571c466577843d8eb1c5e270dd54f1ade6 (patch)
tree3d1274517980b0ad938633d8b18ba6ac786f7048 /runsc/boot/fs.go
parent138cb8da5043c1c8f59f4c27b727383e5ad8254e (diff)
Skip overlay on root when its readonly
PiperOrigin-RevId: 203161098 Change-Id: Ia1904420cb3ee830899d24a4fe418bba6533be64
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r--runsc/boot/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index f36bcdc2e..51c8d620d 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -207,7 +207,7 @@ func createRootMount(ctx context.Context, spec *specs.Spec, conf *Config, fds *f
return nil, fmt.Errorf("error adding submount overlay: %v", err)
}
- if conf.Overlay {
+ if conf.Overlay && !spec.Root.Readonly {
log.Debugf("Adding overlay on top of root mount")
// Overlay a tmpfs filesystem on top of the root.
rootInode, err = addOverlay(ctx, conf, rootInode, "root-overlay-upper", mf)