1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration
Brian Goff 589a0afa8c Use rslave propagation for mounts from daemon root
By default, if a user requests a bind mount it uses private propagation.
When the source path is a path within the daemon root this, along with
some other propagation values that the user can use, causes issues when
the daemon tries to remove a mountpoint because a container will then
have a private reference to that mount which prevents removal.

Unmouting with MNT_DETATCH can help this scenario on newer kernels, but
ultimately this is just covering up the problem and doesn't actually
free up the underlying resources until all references are destroyed.

This change does essentially 2 things:

1. Change the default propagation when unspecified to `rslave` when the
source path is within the daemon root path or a parent of the daemon
root (because everything is using rbinds).
2. Creates a validation error on create when the user tries to specify
an unacceptable propagation mode for these paths...
basically the only two acceptable modes are `rslave` and `rshared`.

In cases where we have used the new default propagation but the
underlying filesystem is not setup to handle it (fs must hvae at least
rshared propagation) instead of erroring out like we normally would,
this falls back to the old default mode of `private`, which preserves
backwards compatibility.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-02-07 14:27:09 -05:00
..
build Add testcase for onbuild command in multi stage build 2017-12-20 11:56:41 -08:00
container Use rslave propagation for mounts from daemon root 2018-02-07 14:27:09 -05:00
image Fix environ substitutions in docker commit --change ... 2017-12-20 11:03:38 -08:00
network fix verbose for partial overlay ID 2018-01-22 18:50:49 -05:00
plugin Replace vol plugin integration test w/ unit test 2017-11-15 13:13:22 -05:00
secret Migrate TestSecretInspect from integration-cli to api tests 2018-02-02 22:23:12 +00:00
service Migrate usage of newSwarm in integration/service to use integration/utils/swarm.NewSwarm 2018-02-02 23:28:54 +00:00
system Migrate TestAuthAPI from integration-cli to integration 2018-01-30 19:15:06 +00:00
testdata/https integration/plugin/authz: port tests from integration-cli 2017-10-02 14:20:59 +01:00
util Migrate usage of newSwarm in integration/service to use integration/utils/swarm.NewSwarm 2018-02-02 23:28:54 +00:00
doc.go