open-vault/api
Vishal Nayak 3e55e79a3f
Autopilot: Server Stabilization, State and Dead Server Cleanup (#10856)
* k8s doc: update for 0.9.1 and 0.8.0 releases (#10825)

* k8s doc: update for 0.9.1 and 0.8.0 releases

* Update website/content/docs/platform/k8s/helm/configuration.mdx

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

* Autopilot initial commit

* Move autopilot related backend implementations to its own file

* Abstract promoter creation

* Add nil check for health

* Add server state oss no-ops

* Config ext stub for oss

* Make way for non-voters

* s/health/state

* s/ReadReplica/NonVoter

* Add synopsis and description

* Remove struct tags from AutopilotConfig

* Use var for config storage path

* Handle nin-config when reading

* Enable testing autopilot by using inmem cluster

* First passing test

* Only report the server as known if it is present in raft config

* Autopilot defaults to on for all existing and new clusters

* Add locking to some functions

* Persist initial config

* Clarify the command usage doc

* Add health metric for each node

* Fix audit logging issue

* Don't set DisablePerformanceStandby to true in test

* Use node id label for health metric

* Log updates to autopilot config

* Less aggressively consume config loading failures

* Return a mutable config

* Return early from known servers if raft config is unable to be pulled

* Update metrics name

* Reduce log level for potentially noisy log

* Add knob to disable autopilot

* Don't persist if default config is in use

* Autopilot: Dead server cleanup (#10857)

* Dead server cleanup

* Initialize channel in any case

* Fix a bunch of tests

* Fix panic

* Add follower locking in heartbeat tracker

* Add LastContactFailureThreshold to config

* Add log when marking node as dead

* Update follower state locking in heartbeat tracker

* Avoid follower states being nil

* Pull test to its own file

* Add execution status to state response

* Optionally enable autopilot in some tests

* Updates

* Added API function to fetch autopilot configuration

* Add test for default autopilot configuration

* Configuration tests

* Add State API test

* Update test

* Added TestClusterOptions.PhysicalFactoryConfig

* Update locking

* Adjust locking in heartbeat tracker

* s/last_contact_failure_threshold/left_server_last_contact_threshold

* Add disabling autopilot as a core config option

* Disable autopilot in some tests

* s/left_server_last_contact_threshold/dead_server_last_contact_threshold

* Set the lastheartbeat of followers to now when setting up active node

* Don't use config defaults from CLI command

* Remove config file support

* Remove HCL test as well

* Persist only supplied config; merge supplied config with default to operate

* Use pointer to structs for storing follower information

* Test update

* Retrieve non voter status from configbucket and set it up when a node comes up

* Manage desired suffrage

* Consider bucket being created already

* Move desired suffrage to its own entry

* s/DesiredSuffrageKey/LocalNodeConfigKey

* s/witnessSuffrage/recordSuffrage

* Fix test compilation

* Handle local node config post a snapshot install

* Commit to storage first; then record suffrage in fsm

* No need of local node config being nili case, post snapshot restore

* Reconcile autopilot config when a new leader takes over duty

* Grab fsm lock when recording suffrage

* s/Suffrage/DesiredSuffrage in FollowerState

* Instantiate autopilot only in leader

* Default to old ways in more scenarios

* Make API gracefully handle 404

* Address some feedback

* Make IsDead an atomic.Value

* Simplify follower hearbeat tracking

* Use uber.atomic

* Don't have multiple causes for having autopilot disabled

* Don't remove node from follower states if we fail to remove the dead server

* Autopilot server removals map (#11019)

* Don't remove node from follower states if we fail to remove the dead server

* Use map to track dead server removals

* Use lock and map

* Use delegate lock

* Adjust when to remove entry from map

* Only hold the lock while accessing map

* Fix race

* Don't set default min_quorum

* Fix test

* Ensure follower states is not nil before starting autopilot

* Fix race

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2021-03-03 13:59:50 -05:00
..
test-fixtures moved the test cert keys to appropriate test-fixtures folder 2016-02-29 15:49:08 -05:00
README.md Add README.md to api (#10088) 2020-10-06 14:27:59 -07:00
api_test.go Redo API locking (#3508) 2017-11-02 09:30:04 -05:00
auth.go Remove RevokePrefix from the API too as we simply do not support it any 2016-04-05 11:00:12 -04:00
auth_token.go Add ability to renew by accessor (#7817) 2019-11-08 11:32:01 -05:00
client.go Respect VAULT_MAX_RETRIES from environment in DefaultConfig() (#10883) 2021-03-02 10:39:20 -08:00
client_test.go don't panic on connection errors in DefaultRetryPolicy (#11002) 2021-02-25 13:16:17 -05:00
go.mod Revert unnecessary changes to api/go.mod (#10097) 2020-10-06 14:25:46 -05:00
go.sum don't panic on connection errors in DefaultRetryPolicy (#11002) 2021-02-25 13:16:17 -05:00
help.go Add a deprecated helper to tokenutil and JSON output to path-help (#7006) 2019-06-27 12:56:31 -04:00
lifetime_watcher.go Sync up Agent and API's renewers. (#7733) 2019-10-28 17:28:59 -07:00
logical.go document response wrapping behavior (#8156) 2020-06-08 10:50:48 -04:00
output_string.go Stop some curl whining (#6385) 2019-03-08 14:14:50 -05:00
plugin_helpers.go Fix automatic token set for plugin unwrap requests (#8058) 2020-01-02 10:40:13 +01:00
renewer_test.go Sync up Agent and API's renewers. (#7733) 2019-10-28 17:28:59 -07:00
request.go Fix SRV Lookups (#8520) 2020-03-11 14:22:58 +01:00
request_test.go Clean up request logic and use retryable's more efficient handling (#4670) 2018-06-01 09:12:43 -04:00
response.go Resource Quotas: Rate Limiting (#9330) 2020-06-26 17:13:16 -04:00
secret.go Added missing entity_id to SecretAuth struct (#6819) 2019-06-04 10:04:20 -07:00
ssh.go API: Add context to each raw request call (#4987) 2018-07-24 15:49:55 -07:00
ssh_agent.go Add namespace parameter to ssh helper config (#9160) 2020-06-08 08:16:03 -07:00
ssh_agent_test.go Fix output-related tests (#4288) 2018-04-05 20:43:29 -04:00
sys.go api: separate sys out further 2015-03-11 17:46:41 -05:00
sys_audit.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
sys_auth.go Batch tokens (#755) 2018-10-15 12:56:24 -04:00
sys_capabilities.go Possibly fix Nomad capabilities issue (#5360) 2018-09-19 13:06:37 -04:00
sys_config_cors.go Add AllowedHeader and fix AllowedOrigins in the API (#10482) 2020-12-03 14:31:25 +01:00
sys_generate_root.go Recovery Mode (#7559) 2019-10-15 00:55:31 -04:00
sys_health.go Add missing performance_standby field to API 2019-01-17 18:15:00 -05:00
sys_init.go API: Add context to each raw request call (#4987) 2018-07-24 15:49:55 -07:00
sys_leader.go core: Record the time a node became active (#10489) 2020-12-11 16:50:19 -08:00
sys_leases.go Update API to use lease_id in body of sys/leases/revoke call (#7777) 2019-11-05 16:14:28 -05:00
sys_monitor.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
sys_mounts.go oss changes for entropy augmentation feature (#7670) 2019-10-17 10:33:00 -07:00
sys_plugins.go Address feedback on Plugin Reload: OSS Side (#9350) 2020-06-30 16:26:38 -05:00
sys_policy.go Fix a couple of instances where we are using LIST verb (#6026) 2019-01-10 19:57:00 -05:00
sys_raft.go Autopilot: Server Stabilization, State and Dead Server Cleanup (#10856) 2021-03-03 13:59:50 -05:00
sys_rekey.go Fixed wrong rekey recovery backup client API URL (#6841) 2019-06-11 10:05:44 +02:00
sys_rotate.go OSS side barrier encryption tracking and automatic rotation (#11007) 2021-02-25 14:27:25 -06:00
sys_seal.go expose 'storage_type' on the sys/seal-status endpoint (#7486) 2019-09-18 14:07:18 -05:00
sys_stepdown.go Fix stepdown body closing 2018-08-04 11:50:29 -04:00

README.md

Vault API

This provides the github.com/hashicorp/vault/api package which contains code useful for interacting with a Vault server.

GoDoc