open-nomad/drivers/docker
Tim Gross aa8927abb4
volumes: return better error messages for unsupported task drivers (#8030)
When an allocation runs for a task driver that can't support volume mounts,
the mounting will fail in a way that can be hard to understand. With host
volumes this usually means failing silently, whereas with CSI the operator
gets inscrutable internals exposed in the `nomad alloc status`.

This changeset adds a MountConfig field to the task driver Capabilities
response. We validate this when the `csi_hook` or `volume_hook` fires and
return a user-friendly error.

Note that we don't currently have a way to get driver capabilities up to the
server, except through attributes. Validating this when the user initially
submits the jobspec would be even better than what we're doing here (and could
be useful for all our other capabilities), but that's out of scope for this
changeset.

Also note that the MountConfig enum starts with "supports all" in order to
support community plugins in a backwards compatible way, rather than cutting
them off from volume mounting unexpectedly.
2020-05-21 09:18:02 -04:00
..
cmd
docklog Use an image managed by nomad account 2020-05-15 12:55:22 -04:00
test-resources/docker Parse security_opts before sending them to docker daemon 2020-03-31 08:34:41 -07:00
util docker: Support stats on Windows 2019-02-22 14:19:58 +01:00
config.go volumes: return better error messages for unsupported task drivers (#8030) 2020-05-21 09:18:02 -04:00
config_test.go use allow_runtimes for consistency 2020-05-12 11:03:08 -04:00
coordinator.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
coordinator_test.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
driver.go docker: Fix docker image gc tracking 2020-05-13 12:33:17 -04:00
driver_darwin_test.go
driver_default.go docker: v19.03.8 2020-03-28 17:29:04 +01:00
driver_linux_test.go tests: attempt to deflake TestDockerDriver_PidsLimit 2020-03-30 07:06:52 -04:00
driver_pre09.go client: fix bug during 0.8 state up grade that causes external drivers to fail 2019-01-30 14:22:29 -05:00
driver_test.go Use an image managed by nomad account 2020-05-15 12:55:22 -04:00
driver_unix_test.go tests: swap lib/freeport for tweaked helper/freeport 2019-12-09 08:37:32 -06:00
driver_windows.go driver/docker: use default network mode 2019-07-31 21:07:46 +03:00
driver_windows_test.go Use an image managed by nomad account 2020-05-15 12:55:22 -04:00
fingerprint.go Run Linux Images (LCOW) and Windows Containers side by side (#7850) 2020-05-04 13:08:47 -04:00
fingerprint_test.go docker: report unhealthy in unsupported Windows (#5356) 2019-02-27 08:10:23 -05:00
handle.go driver: allow disabling log collection 2019-12-08 14:15:03 -05:00
network.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
progress.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
progress_test.go
reconciler.go add timeouts for docker reconciler docker calls 2019-10-18 15:31:13 -04:00
reconciler_test.go tests: swap lib/freeport for tweaked helper/freeport 2019-12-09 08:37:32 -06:00
state.go
stats.go docker: improve stats names and comments 2019-04-02 09:18:38 -07:00
stats_test.go docker: improve stats names and comments 2019-04-02 09:18:38 -07:00
utils.go Resolve docker types conflict 2020-03-28 17:29:06 +01:00
utils_test.go driver/docker: Support volumes field in Windows 2019-04-25 09:02:44 -04:00
utils_unix_test.go Remove argument passing runtime GOOS 2020-03-03 15:39:43 +01:00
utils_windows_test.go Avoid resolving dotted segments when host path for volume is named pipe 2020-03-03 14:00:19 +01:00
win32_volume_parse.go driver/docker: support unix destination mount path in windows 2019-08-01 19:54:08 +03:00