diff --git a/cluster/calcium/helper.go b/cluster/calcium/helper.go index 62a15cdba..9e1567fd7 100644 --- a/cluster/calcium/helper.go +++ b/cluster/calcium/helper.go @@ -91,7 +91,7 @@ func makeMountPaths(specs types.Specs, config types.Config) ([]string, map[strin expanded := os.Expand(path, expandENV) parts := strings.Split(expanded, ":") if len(parts) == 2 { - binds = append(binds, fmt.Sprintf("%s:%s:ro", parts[0], parts[1])) + binds = append(binds, fmt.Sprintf("%s:%s:rw", parts[0], parts[1])) volumes[parts[1]] = struct{}{} } else if len(parts) == 3 { binds = append(binds, fmt.Sprintf("%s:%s:%s", parts[0], parts[1], parts[2])) diff --git a/cluster/calcium/helper_test.go b/cluster/calcium/helper_test.go index 7bd5020e5..1abece42b 100644 --- a/cluster/calcium/helper_test.go +++ b/cluster/calcium/helper_test.go @@ -11,6 +11,6 @@ func TestMakeMountPaths(t *testing.T) { config := types.Config{PermDir: "/mnt/mfs/permdirs", AppDir: "/home"} specs := types.Specs{Appname: "foo", Volumes: []string{"$PERMDIR/foo-data:$APPDIR/foo-data"}} binds, volumes := makeMountPaths(specs, config) - assert.Equal(t, binds, []string{"/mnt/mfs/permdirs/foo/foo-data:/home/foo/foo-data:ro", "/proc/sys:/writable-proc/sys:rw", "/sys/kernel/mm/transparent_hugepage:/writable-sys/kernel/mm/transparent_hugepage:rw"}, "binds should be the same") + assert.Equal(t, binds, []string{"/mnt/mfs/permdirs/foo/foo-data:/home/foo/foo-data:rw", "/proc/sys:/writable-proc/sys:rw", "/sys/kernel/mm/transparent_hugepage:/writable-sys/kernel/mm/transparent_hugepage:rw"}, "binds should be the same") assert.Equal(t, volumes, map[string]struct{}{"/home/foo/foo-data": struct{}{}, "/writable-proc/sys": struct{}{}, "/writable-sys/kernel/mm/transparent_hugepage": struct{}{}}) }