mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
csi: nomad volume detach command (#8584)
The soundness guarantees of the CSI specification leave a little to be desired in our ability to provide a 100% reliable automated solution for managing volumes. This changeset provides a new command to bridge this gap by providing the operator the ability to intervene. The command doesn't take an allocation ID so that the operator doesn't have to keep track of alloc IDs that may have been GC'd. Handle this case in the unpublish RPC by sending the client RPC for all the terminal/nil allocs on the selected node.
This commit is contained in:
5
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
5
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
@@ -60,6 +60,11 @@ func (v *CSIVolumes) Deregister(id string, force bool, w *WriteOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (v *CSIVolumes) Detach(volID, nodeID string, w *WriteOptions) error {
|
||||
_, err := v.client.delete(fmt.Sprintf("/v1/volume/csi/%v/detach?node=%v", url.PathEscape(volID), nodeID), nil, w)
|
||||
return err
|
||||
}
|
||||
|
||||
// CSIVolumeAttachmentMode duplicated in nomad/structs/csi.go
|
||||
type CSIVolumeAttachmentMode string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user