open-nomad/client/pluginmanager/csimanager
Tim Gross 66b4b28b1a
CSI: node unmount from the client before unpublish RPC (#11892)
When an allocation stops, the `csi_hook` makes an unpublish RPC to the
servers to unpublish via the CSI RPCs: first to the node plugins and
then the controller plugins. The controller RPCs must happen after the
node RPCs so that the node has had a chance to unmount the volume
before the controller tries to detach the associated device.

But the client has local access to the node plugins and can
independently determine if it's safe to send unpublish RPC to those
plugins. This will allow the server to treat the node plugin as
abandoned if a client is disconnected and `stop_on_client_disconnect`
is set. This will let the server try to send unpublish RPCs to the
controller plugins, under the assumption that the client will be
trying to unmount the volume on its end first.

Note that the CSI `NodeUnpublishVolume`/`NodeUnstageVolume` RPCs can 
return ignorable errors in the case where the volume has already been
unmounted from the node. Handle all other errors by retrying until we
get success so as to give operators the opportunity to reschedule a
failed node plugin (ex. in the case where they accidentally drained a
node without `-ignore-system`). Fan-out the work for each volume into
its own goroutine so that we can release a subset of volumes if only
one is stuck.
2022-01-28 08:30:31 -05:00
..
doc.go csi: Add VolumeManager (#6920) 2020-03-23 13:58:29 -04:00
fingerprint.go CSI: fingerprint detailed node capabilities 2021-04-01 16:00:58 -04:00
fingerprint_test.go csi: annotate remaining missing cancellation contexts (#7552) 2020-03-30 16:46:43 -04:00
instance.go csi: add node events to report progress mounting and unmounting volumes (#7547) 2020-03-31 17:13:52 -04:00
instance_test.go csi: checkpoint volume claim garbage collection (#7782) 2020-04-23 11:06:23 -04:00
interface.go CSI: use AccessMode/AttachmentMode from CSIVolumeClaim 2021-04-07 11:24:09 -04:00
manager.go CSI: move node unmount to server-driven RPCs (#7596) 2020-04-02 16:04:56 -04:00
manager_test.go csi: dynamically update plugin registration (#7386) 2020-03-23 13:59:25 -04:00
usage_tracker.go CSI: move node unmount to server-driven RPCs (#7596) 2020-04-02 16:04:56 -04:00
usage_tracker_test.go CSI: move node unmount to server-driven RPCs (#7596) 2020-04-02 16:04:56 -04:00
volume.go CSI: node unmount from the client before unpublish RPC (#11892) 2022-01-28 08:30:31 -05:00
volume_test.go deps: upgrade docker and runc 2022-01-18 08:35:26 -06:00