f6b3d38eb8
If a volume-claiming alloc stops and the CSI Node plugin that serves that alloc's volumes is missing, there's no way for the allocrunner hook to send the `NodeUnpublish` and `NodeUnstage` RPCs. This changeset addresses this issue with a redesign of the client-side for CSI. Rather than unmounting in the alloc runner hook, the alloc runner hook will simply exit. When the server gets the `Node.UpdateAlloc` for the terminal allocation that had a volume claim, it creates a volume claim GC job. This job will made client RPCs to a new node plugin RPC endpoint, and only once that succeeds, move on to making the client RPCs to the controller plugin. If the node plugin is unavailable, the GC job will fail and be requeued.
12 lines
336 B
Go
12 lines
336 B
Go
package nomad
|
|
|
|
import "github.com/hashicorp/nomad/nomad/state"
|
|
|
|
// RPCServer is a minimal interface of the Server, intended as
|
|
// an aid for testing logic surrounding server-to-server or
|
|
// server-to-client RPC calls
|
|
type RPCServer interface {
|
|
RPC(method string, args interface{}, reply interface{}) error
|
|
State() *state.StateStore
|
|
}
|