open-nomad/drivers/java
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
..
test-resources add java driver tests 2018-11-06 12:41:39 -08:00
driver.go volumes: return better error messages for unsupported task drivers (#8030) 2020-05-21 09:18:02 -04:00
driver_pre09.go drivers: always initialize taskHandle.logger 2019-11-22 10:44:59 -05:00
driver_test.go drivers: implement streaming exec for executor based drivers 2019-05-10 19:17:14 -04:00
handle.go goimports 2019-01-22 15:44:31 -08:00
state.go Implement java driver 2018-11-06 12:41:39 -08:00
utils.go drivers/java: restore 0.8.7 java version detection (#5317) 2019-02-12 13:41:26 -05:00
utils_test.go drivers/java: restore 0.8.7 java version detection (#5317) 2019-02-12 13:41:26 -05:00