open-nomad/client/allocrunner/taskrunner
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
..
getter getter: allow the gcs download scheme (#6692) 2019-11-19 09:10:56 -05:00
interfaces
restarts fix test 2020-03-21 17:52:57 -04:00
state
template Deflake TestTaskTemplateManager_BlockedEvents test 2020-05-09 14:09:39 -04:00
testdata executor/linux: make chroot binary paths absolute 2019-04-01 15:45:31 -07:00
artifact_hook.go
artifact_hook_test.go
device_hook.go
device_hook_test.go
dispatch_hook.go
dispatch_hook_test.go
driver_handle.go implement client endpoint of nomad exec 2019-05-09 16:49:08 -04:00
envoybootstrap_hook.go connect: set consul TLS options on envoy bootstrap 2020-04-02 10:30:50 -06:00
envoybootstrap_hook_test.go connect: set consul TLS options on envoy bootstrap 2020-04-02 10:30:50 -06:00
errors.go
errors_test.go
lazy_handle.go
lifecycle.go tr: Fetch Wait channel before killTask in restart 2019-06-26 15:20:57 +02:00
logmon_hook.go address review comments 2019-12-13 11:21:00 -05:00
logmon_hook_test.go driver: allow disabling log collection 2019-12-08 14:15:03 -05:00
logmon_hook_unix_test.go driver: allow disabling log collection 2019-12-08 14:15:03 -05:00
plugin_supervisor_hook.go csi: use a blocking initial connection with timeout 2020-05-14 15:59:19 -04:00
script_check_hook.go interpolate environment for services in script checks (#6916) 2020-01-09 08:12:54 -05:00
script_check_hook_test.go interpolate environment for services in script checks (#6916) 2020-01-09 08:12:54 -05:00
service_hook.go Run task shutdown_delay regardless of service registration 2020-04-10 11:06:26 -04:00
service_hook_test.go tr/service_hook: reset initialized flag during deregister 2020-04-06 16:05:36 -04:00
sids_hook.go client: PR cleanup - improved logging around kill task in SIDS hook 2020-01-31 19:05:23 -06:00
sids_hook_test.go tests: set consul token for nomad client for testing SIDS TR hook 2020-01-31 19:06:15 -06:00
stats_hook.go stats_hook: log normal shutdown condition as debug, not error (#8028) 2020-05-20 10:28:30 -04:00
stats_hook_test.go
task_dir_hook.go
task_runner.go Update hcl2 vendoring 2020-05-19 15:00:03 -04:00
task_runner_getters.go Merge pull request #5518 from hashicorp/f-simplify-kill 2019-04-15 14:11:58 -07:00
task_runner_hooks.go connect: set consul TLS options on envoy bootstrap 2020-04-02 10:30:50 -06:00
task_runner_test.go tests: restart restartpolicy for all tasks in tests 2020-03-24 21:52:48 -04:00
tasklet.go comments: cleanup some leftover debug comments and such 2020-01-31 19:04:35 -06:00
tasklet_test.go support script checks for task group services (#6197) 2019-09-03 15:09:04 -04:00
template_hook.go
validate_hook.go
validate_hook_test.go
vault_hook.go
vault_hook_test.go
volume_hook.go volumes: return better error messages for unsupported task drivers (#8030) 2020-05-21 09:18:02 -04:00
volume_hook_test.go volumes: return better error messages for unsupported task drivers (#8030) 2020-05-21 09:18:02 -04:00