Browse code

fix default tmpfs size to prevent breakage

Signed-off-by: Jess Frazelle <me@jessfraz.com>

Jess Frazelle authored on 2016/06/09 16:12:34
Showing 2 changed files
... ...
@@ -480,7 +480,7 @@ func setMounts(daemon *Daemon, s *specs.Spec, c *container.Container, mounts []c
480 480
 		}
481 481
 
482 482
 		if m.Source == "tmpfs" {
483
-			options := []string{"noexec", "nosuid", "nodev", volume.DefaultPropagationMode, "size=65536k"}
483
+			options := []string{"noexec", "nosuid", "nodev", volume.DefaultPropagationMode}
484 484
 			if m.Data != "" {
485 485
 				options = append(options, strings.Split(m.Data, ",")...)
486 486
 			}
... ...
@@ -833,17 +833,19 @@ func (s *DockerSuite) TestRunTmpfsMounts(c *check.C) {
833 833
 func (s *DockerSuite) TestRunTmpfsMountsWithOptions(c *check.C) {
834 834
 	testRequires(c, DaemonIsLinux)
835 835
 
836
-	expectedOptions := []string{"rw", "nosuid", "nodev", "noexec", "relatime", "size=65536k"}
836
+	expectedOptions := []string{"rw", "nosuid", "nodev", "noexec", "relatime"}
837 837
 	out, _ := dockerCmd(c, "run", "--tmpfs", "/tmp", "busybox", "sh", "-c", "mount | grep 'tmpfs on /tmp'")
838 838
 	for _, option := range expectedOptions {
839 839
 		c.Assert(out, checker.Contains, option)
840 840
 	}
841
+	c.Assert(out, checker.Not(checker.Contains), "size=")
841 842
 
842
-	expectedOptions = []string{"rw", "nosuid", "nodev", "noexec", "relatime", "size=65536k"}
843
+	expectedOptions = []string{"rw", "nosuid", "nodev", "noexec", "relatime"}
843 844
 	out, _ = dockerCmd(c, "run", "--tmpfs", "/tmp:rw", "busybox", "sh", "-c", "mount | grep 'tmpfs on /tmp'")
844 845
 	for _, option := range expectedOptions {
845 846
 		c.Assert(out, checker.Contains, option)
846 847
 	}
848
+	c.Assert(out, checker.Not(checker.Contains), "size=")
847 849
 
848 850
 	expectedOptions = []string{"rw", "nosuid", "nodev", "relatime", "size=8192k"}
849 851
 	out, _ = dockerCmd(c, "run", "--tmpfs", "/tmp:rw,exec,size=8192k", "busybox", "sh", "-c", "mount | grep 'tmpfs on /tmp'")