-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5784 from hashicorp/b-batch-node-dereg
batch node deregistration
- Loading branch information
Showing
13 changed files
with
264 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# New RPC Endpoint Checklist | ||
|
||
Prefer adding a new message to changing any existing RPC messages. | ||
|
||
## Code | ||
|
||
* [ ] `Request` struct and `*RequestType` constant in | ||
`nomad/structs/structs.go`. Append the constant, old constant | ||
values must remain unchanged | ||
* [ ] In `nomad/fsm.go`, add a dispatch case to the switch statement in `Apply` | ||
* `*nomadFSM` method to decode the request and call the state method | ||
* [ ] State method for modifying objects in a `Txn` in `nomad/state/state_store.go` | ||
* `nomad/state/state_store_test.go` | ||
* [ ] Handler for the request in `nomad/foo_endpoint.go` | ||
* RPCs are resolved by matching the method name for bound structs | ||
[net/rpc](https://golang.org/pkg/net/rpc/) | ||
* Wrapper for the HTTP request in `command/agent/foo_endpoint.go` | ||
* Backwards compatibility requires a new endpoint, an upgraded | ||
client or server may be forwarding this request to an old server, | ||
without support for the new RPC | ||
* RPCs triggered by an internal process may not need support | ||
* [ ] `nomad/core_sched.go` sends many RPCs | ||
* `ServersMeetMinimumVersion` asserts that the server cluster is | ||
upgraded, so use this to gaurd sending the new RPC, else send the old RPC | ||
* Version must match the actual release version! | ||
|
||
## Docs | ||
|
||
* [ ] Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.