4fbcc668d0
This commit introduces support for configuring mount propagation when mounting volumes with the `volume_mount` stanza on Linux targets. Similar to Kubernetes, we expose 3 options for configuring mount propagation: - private, which is equivalent to `rprivate` on Linux, which does not allow the container to see any new nested mounts after the chroot was created. - host-to-task, which is equivalent to `rslave` on Linux, which allows new mounts that have been created _outside of the container_ to be visible inside the container after the chroot is created. - bidirectional, which is equivalent to `rshared` on Linux, which allows both the container to see new mounts created on the host, but importantly _allows the container to create mounts that are visible in other containers an don the host_ private and host-to-task are safe, but bidirectional mounts can be dangerous, as if the code inside a container creates a mount, and does not clean it up before tearing down the container, it can cause bad things to happen inside the kernel. To add a layer of safety here, we require that the user has ReadWrite permissions on the volume before allowing bidirectional mounts, as a defense in depth / validation case, although creating mounts should also require a priviliged execution environment inside the container. |
||
---|---|---|
.. | ||
contexts | ||
internal/testutil | ||
acl.go | ||
acl_test.go | ||
agent.go | ||
agent_test.go | ||
allocations.go | ||
allocations_test.go | ||
api.go | ||
api_test.go | ||
compose_test.go | ||
constraint.go | ||
constraint_test.go | ||
deployments.go | ||
evaluations.go | ||
evaluations_test.go | ||
fs.go | ||
fs_test.go | ||
go.mod | ||
go.sum | ||
jobs.go | ||
jobs_test.go | ||
namespace.go | ||
namespace_test.go | ||
nodes.go | ||
nodes_test.go | ||
operator.go | ||
operator_autopilot.go | ||
operator_test.go | ||
quota.go | ||
quota_test.go | ||
raw.go | ||
regions.go | ||
regions_test.go | ||
resources.go | ||
search.go | ||
search_test.go | ||
sentinel.go | ||
sentinel_test.go | ||
services.go | ||
services_test.go | ||
status.go | ||
status_test.go | ||
system.go | ||
system_test.go | ||
tasks.go | ||
tasks_test.go | ||
util_test.go | ||
utils.go | ||
utils_test.go |