open-nomad/api
Danielle Lancashire 4fbcc668d0
volumes: Add support for mount propagation
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.
2019-10-14 14:09:58 +02:00
..
contexts
internal/testutil Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
acl.go
acl_test.go
agent.go spelling: unmarshal 2018-03-11 19:07:44 +00:00
agent_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
allocations.go api: add missing Networks field to alloc resources 2019-07-31 01:04:06 -04:00
allocations_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
api.go job region defaults to client node region if 'global' or none provided (#6064) 2019-08-05 14:28:02 -07:00
api_test.go api: allow configuring http client 2019-05-17 16:26:58 -04:00
compose_test.go fix tests from introducing new struct fields 2019-07-31 01:03:16 -04:00
constraint.go copied consts used by jobspec parsing from structs into api package, to avoid referencing structs package in jobspec (#5663) 2019-05-09 08:23:49 -04:00
constraint_test.go
deployments.go code review fixes 2018-05-31 10:57:08 -07:00
evaluations.go add create and modify timestamps to evaluations (#5881) 2019-08-07 09:50:35 -07:00
evaluations_test.go non-Existent -> nonexistent 2018-03-12 11:59:33 -07:00
fs.go Infer content type in alloc fs stat endpoint 2019-06-28 20:31:28 -05:00
fs_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
go.mod Add go.mod/go.sum (#5493) 2019-03-29 15:02:32 -04:00
go.sum Add go.mod/go.sum (#5493) 2019-03-29 15:02:32 -04:00
jobs.go add default update stanza and max_parallel=0 disables deployments (#6191) 2019-09-02 10:30:09 -07:00
jobs_test.go add default update stanza and max_parallel=0 disables deployments (#6191) 2019-09-02 10:30:09 -07:00
namespace.go
namespace_test.go
nodes.go remove hidden field from host volumes 2019-08-22 08:48:05 +02:00
nodes_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
operator.go Rename to match system scheduler config. 2019-05-03 14:06:12 -05:00
operator_autopilot.go Fix make check errors 2018-09-04 16:03:52 -07:00
operator_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
quota.go
quota_test.go
raw.go
regions.go
regions_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
resources.go cli: display group ports and address in alloc status command output (#6189) 2019-08-27 23:59:36 -04:00
search.go
search_test.go Add new reschedule options to API layer and unit tests 2018-03-14 16:10:32 -05:00
sentinel.go
sentinel_test.go
services.go client/connect: ConsulProxy LocalServicePort/Address (#6358) 2019-09-23 14:30:48 -04:00
services_test.go client/connect: ConsulProxy LocalServicePort/Address (#6358) 2019-09-23 14:30:48 -04:00
status.go
status_test.go
system.go
system_test.go
tasks.go volumes: Add support for mount propagation 2019-10-14 14:09:58 +02:00
tasks_test.go volumes: Add support for mount propagation 2019-10-14 14:09:58 +02:00
util_test.go backfill region from job hcl in jobUpdate and jobPlan endpoints 2019-06-13 08:03:16 -07:00
utils.go Update comment on int8ToPtr 2019-01-30 12:23:14 -08:00
utils_test.go api: move formatFloat function 2019-01-18 15:31:31 -05:00