open-vault/vault
swayne275 e4119a6a8a
Vault-1403 Switch Expiration Manager to use Fairsharing Backpressure (#1709) (#10932)
* basic pool and start testing

* refactor a bit for testing

* workFunc, start/stop safety, testing

* cleanup function for worker quit, more tests

* redo public/private members

* improve tests, export types, switch uuid package

* fix loop capture bug, cleanup

* cleanup tests

* update worker pool file name, other improvements

* add job manager prototype

* remove remnants

* add functions to wait for job manager and worker pool to stop, other fixes

* test job manager functionality, fix bugs

* encapsulate how jobs are distributed to workers

* make worker job channel read only

* add job interface, more testing, fixes

* set name for dispatcher

* fix test races

* wire up expiration manager most of the way

* dispatcher and job manager constructors don't return errors

* logger now dependency injected

* make some members private, test fcn to get worker pool size

* make GetNumWorkers public

* Update helper/fairshare/jobmanager_test.go

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>

* update fairsharing usage, add tests

* make workerpool private

* remove custom worker names

* concurrency improvements

* remove worker pool cleanup function

* remove cleanup func from job manager, remove non blocking stop from fairshare

* update job manager for new constructor

* stop job manager when expiration manager stopped

* unset env var after test

* stop fairshare when started in tests

* stop leaking job manager goroutine

* prototype channel for waking up to assign work

* fix typo/bug and add tests

* improve job manager wake up, fix test typo

* put channel drain back

* better start/pause test for job manager

* comment cleanup

* degrade possible noisy log

* remove closure, clean up context

* improve revocation context timer

* test: reduce number of revocation workers during many tests

* Update vault/expiration.go

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>

* feedback tweaks

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>
2021-02-17 14:30:27 -08:00
..
activity Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
cluster Port changes from enterprise lease fix (#10020) 2020-09-22 14:47:13 -07:00
external_tests Feature flags API (#10613) 2021-01-06 16:05:00 -06:00
quotas Fix error in log; add additional log on conflicting quotas. (#10888) 2021-02-10 12:24:35 -06:00
replication Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
seal Same seal migration oss (#10224) 2020-10-23 14:16:04 -04:00
acl.go Check nil parameter value when processing an ACL. 2019-04-26 15:57:00 -07:00
acl_test.go Update HCL dependency to fix ParseACLPolicy error on invalid syntax (#10156) 2020-11-30 09:17:33 -06:00
acl_util.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
activity_log.go Fix flaky ActivityLog unit test (#10860) 2021-02-09 16:34:49 -06:00
activity_log_test.go Fix flaky ActivityLog unit test (#10860) 2021-02-09 16:34:49 -06:00
activity_log_testing_util.go Fix setting Activity Log enable flag through the API (#10594) 2020-12-18 11:20:32 -07:00
activity_log_util.go Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
audit.go Send a test message before committing a new audit device. (#10520) 2020-12-16 16:00:32 -06:00
audit_broker.go Allow plugins to submit audit requests/responses via extended SystemView (#6777) 2019-05-22 18:52:53 -04:00
audit_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
audited_headers.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
audited_headers_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
auth.go Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
auth_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
barrier.go Test for overflow of the capacity value (#9317) 2020-06-25 11:22:13 -05:00
barrier_access.go Fix compile 2018-01-19 05:31:55 -05:00
barrier_aes_gcm.go Add NIST guidance on rotating keys used for AES-GCM encryption (#10612) 2021-01-07 15:37:37 -06:00
barrier_aes_gcm_test.go Shamir seals now come in two varieties: legacy and new-style. (#7694) 2019-10-18 14:46:00 -04:00
barrier_test.go Shamir seals now come in two varieties: legacy and new-style. (#7694) 2019-10-18 14:46:00 -04:00
barrier_view.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
barrier_view_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
barrier_view_util.go The big one (#5346) 2018-09-17 23:03:00 -04:00
capabilities.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
capabilities_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
cluster.go Eliminate global that caused race tests to fail in ent with an internal config setting. (#9604) 2020-07-27 16:10:26 -04:00
cluster_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
core.go Vault-1403 Switch Expiration Manager to use Fairsharing Backpressure (#1709) (#10932) 2021-02-17 14:30:27 -08:00
core_metrics.go metrics: activity log (#10514) 2021-01-26 16:37:07 -06:00
core_metrics_test.go Fix crash when KV store has a zero-length key. (#9881) 2020-09-02 17:43:44 -05:00
core_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
core_util.go Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
cors.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
counters.go Move "counters" path to the logical system's local path list. (#10314) 2020-11-02 21:59:55 -06:00
counters_test.go Fix token counters test (#7867) 2019-11-12 13:33:28 -05:00
deadlock.go Add option to detect deadlocks in Core.stateLock using build tag `deadlock` (#8524) 2020-03-10 16:01:20 -04:00
dynamic_system_view.go Move sdk/helper/random -> helper/random (#9226) 2020-06-17 14:24:38 -06:00
dynamic_system_view_test.go Add user configurable password policies available to secret engines (#8637) 2020-05-27 12:28:00 -06:00
expiration.go Vault-1403 Switch Expiration Manager to use Fairsharing Backpressure (#1709) (#10932) 2021-02-17 14:30:27 -08:00
expiration_integ_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
expiration_test.go Vault-1403 Switch Expiration Manager to use Fairsharing Backpressure (#1709) (#10932) 2021-02-17 14:30:27 -08:00
expiration_util.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
generate_root.go Same seal migration oss (#10224) 2020-10-23 14:16:04 -04:00
generate_root_recovery.go Same seal migration oss (#10224) 2020-10-23 14:16:04 -04:00
generate_root_test.go Shamir seals now come in two varieties: legacy and new-style. (#7694) 2019-10-18 14:46:00 -04:00
ha.go core: Record the time a node became active (#10489) 2020-12-11 16:50:19 -08:00
ha_test.go fix deadlock on core state lock (#10456) 2020-12-10 06:50:11 -05:00
identity_lookup.go Switch to go modules (#6585) 2019-04-13 03:44:06 -04:00
identity_lookup_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
identity_store.go Revert "Migrate internalshared out (#9727)" (#10141) 2020-10-13 16:38:21 -07:00
identity_store_aliases.go Prevent entity alias creation when entity is in different NS than mount (#943) (#6886) 2019-06-14 12:53:00 -04:00
identity_store_aliases_test.go Prevent entity alias creation when entity is in different NS than mount (#943) (#6886) 2019-06-14 12:53:00 -04:00
identity_store_entities.go Correct lock acquisition order in the `pathEntityMergeID` identity to fix deadlock condition (#10877) 2021-02-10 11:05:16 -05:00
identity_store_entities_test.go VAULT-417: check expired context in entity API (#1445) (#9925) 2020-09-10 16:31:32 -06:00
identity_store_group_aliases.go Update group alias handling to better protect against namespace differences 2019-06-18 16:43:30 -04:00
identity_store_group_aliases_test.go Update group alias handling to better protect against namespace differences 2019-06-18 16:43:30 -04:00
identity_store_groups.go Fix use of identity/group endpoint to edit group by name (#10812) 2021-01-29 16:50:08 -06:00
identity_store_groups_test.go Fix use of identity/group endpoint to edit group by name (#10812) 2021-01-29 16:50:08 -06:00
identity_store_oidc.go Fix identity token caching (#8412) 2020-02-26 15:56:19 -05:00
identity_store_oidc_test.go Run CI tests in docker instead of a machine. (#8948) 2020-09-15 10:01:26 -04:00
identity_store_oidc_util.go Fix identity token caching (#8412) 2020-02-26 15:56:19 -05:00
identity_store_schema.go Storage packer V1 updates (#6531) 2019-05-07 15:29:51 -04:00
identity_store_structs.go Fix identity case sensitivity loading in secondary cluster (#7327) 2019-09-30 10:27:25 -04:00
identity_store_test.go Fix a race caused by assignment to core.metricSink (#9560) 2020-07-22 13:52:10 -04:00
identity_store_upgrade.go Prevent entity alias creation when entity is in different NS than mount (#943) (#6886) 2019-06-14 12:53:00 -04:00
identity_store_util.go Entity and alias counts (#9262) 2020-06-23 19:45:59 -05:00
init.go Be consistent with how we report init status. (#10498) 2020-12-08 13:55:34 -05:00
init_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
keyring.go Add NIST guidance on rotating keys used for AES-GCM encryption (#10612) 2021-01-07 15:37:37 -06:00
keyring_test.go Spelling (#4119) 2018-03-20 14:54:10 -04:00
lock.go Add option to detect deadlocks in Core.stateLock using build tag `deadlock` (#8524) 2020-03-10 16:01:20 -04:00
logical_cubbyhole.go Reject requests read and write requests to cubbyhole with an empty path (#8971) 2020-05-11 14:15:36 -05:00
logical_cubbyhole_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
logical_passthrough.go Switch to go modules (#6585) 2019-04-13 03:44:06 -04:00
logical_passthrough_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
logical_raw.go Run go fmt (#7823) 2019-11-07 08:54:34 -08:00
logical_system.go Improve error messages (#10843) 2021-02-11 19:51:12 -08:00
logical_system_activity.go Fix setting Activity Log enable flag through the API (#10594) 2020-12-18 11:20:32 -07:00
logical_system_helpers.go Fix remove peers check (#10758) 2021-01-25 14:20:46 -05:00
logical_system_integ_test.go Fix wrong err return value in plugin reload status command (#9348) 2020-06-30 13:33:30 -05:00
logical_system_paths.go Implement sys/seal-status and sys/leader in system backend (#10725) 2021-01-20 14:04:24 -06:00
logical_system_pprof.go sys/pprof: fix pprof index description (#7564) 2019-10-03 17:02:41 -07:00
logical_system_quotas.go Fix quota enforcing old path issue (#10689) 2021-02-09 05:46:09 -05:00
logical_system_raft.go Revert "Read-replica instead of non-voter (#10875)" (#10890) 2021-02-10 16:41:58 -05:00
logical_system_test.go Validate to/from parameters when remounting a backend (#9890) 2020-10-29 14:06:07 -04:00
logical_system_util.go Move the declaration to a OSS build tag file to not have it collide w… (#10750) 2021-01-25 09:35:19 -05:00
mount.go Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
mount_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
mount_util.go Port filtered paths changes back to OSS (#7741) 2019-10-27 13:30:38 -07:00
namespaces.go Backport some OSS changes (#10267) 2020-10-29 16:47:34 -07:00
plugin_catalog.go DBPW - Copy `newdbplugin` package to `dbplugin/v5` (#10151) 2020-10-15 13:20:12 -06:00
plugin_catalog_test.go Adding snowflake as a bundled database secrets plugin (#10603) 2021-01-07 09:30:24 -08:00
plugin_reload.go Fix wrong err return value in plugin reload status command (#9348) 2020-06-30 13:33:30 -05:00
policy.go Add identity templating helper to sdk/framework (#8088) 2020-01-06 10:16:52 -08:00
policy_store.go Add maximum amount of random entropy requested (#7144) 2019-07-24 18:22:23 -07:00
policy_store_test.go core/policy & core/token: Remove Dead Test Code (#7774) 2019-11-04 10:36:07 +01:00
policy_store_util.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
policy_test.go Fix hasMountPath for segment wildcard mounts; introduce priority order (#6532) 2019-04-10 17:46:17 -04:00
policy_util.go The big one (#5346) 2018-09-17 23:03:00 -04:00
raft.go Revert "Read-replica instead of non-voter (#10875)" (#10890) 2021-02-10 16:41:58 -05:00
rekey.go Fix panic in RekeyVerifyRestart (#9930) (#10099) 2020-10-07 11:06:17 -07:00
rekey_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
request_forwarding.go Eliminate global that caused race tests to fail in ent with an internal config setting. (#9604) 2020-07-27 16:10:26 -04:00
request_forwarding_rpc.go Revert global plugin reload commits (#9344) 2020-06-29 17:36:22 -05:00
request_forwarding_rpc_util.go The big one (#5346) 2018-09-17 23:03:00 -04:00
request_forwarding_service.pb.go Port changes from enterprise lease fix (#10020) 2020-09-22 14:47:13 -07:00
request_forwarding_service.proto Backport the pieces of the replication API changes (#9425) 2020-07-09 15:11:37 -07:00
request_handling.go Fix error in log; add additional log on conflicting quotas. (#10888) 2021-02-10 12:24:35 -06:00
request_handling_test.go auth: store period value on tokens created via login (#7885) 2020-10-26 16:25:56 -04:00
request_handling_util.go Apply OSS part of ENT change re waitForReplicationState. (#10837) 2021-02-04 09:10:35 -05:00
rollback.go Fixed a bunch of typos (#7146) 2019-07-18 21:10:15 -04:00
rollback_test.go Switch to go modules (#6585) 2019-04-13 03:44:06 -04:00
router.go Resource Quotas: Rate Limiting (#9330) 2020-06-26 17:13:16 -04:00
router_access.go The big one (#5346) 2018-09-17 23:03:00 -04:00
router_test.go Fix a deadlock if a panic happens during request handling (#6920) 2019-06-19 09:40:57 -04:00
router_testing.go AWS upgrade role entries (#7025) 2019-07-05 16:55:40 -07:00
seal.go Same seal migration oss (#10224) 2020-10-23 14:16:04 -04:00
seal_access.go Migrate built in auto seal to go-kms-wrapping (#8118) 2020-01-10 20:39:52 -05:00
seal_autoseal.go Ensure that perf standbys can perform seal migrations. (#9690) 2020-08-10 08:35:57 -04:00
seal_autoseal_test.go Migrate built in auto seal to go-kms-wrapping (#8118) 2020-01-10 20:39:52 -05:00
seal_test.go Shamir seals now come in two varieties: legacy and new-style. (#7694) 2019-10-18 14:46:00 -04:00
seal_testing.go Migrate built in auto seal to go-kms-wrapping (#8118) 2020-01-10 20:39:52 -05:00
seal_testing_util.go Create configutil and move some common config and setup functions there (#8362) 2020-05-14 09:19:27 -04:00
sealunwrapper.go Migrate built in auto seal to go-kms-wrapping (#8118) 2020-01-10 20:39:52 -05:00
sealunwrapper_test.go Migrate built in auto seal to go-kms-wrapping (#8118) 2020-01-10 20:39:52 -05:00
testing.go Vault-1403 Switch Expiration Manager to use Fairsharing Backpressure (#1709) (#10932) 2021-02-17 14:30:27 -08:00
testing_util.go Port changes from enterprise lease fix (#10020) 2020-09-22 14:47:13 -07:00
token_store.go make token create case insensitive [VAULT-1021] (#10743) 2021-01-27 09:56:54 -08:00
token_store_test.go make token create case insensitive [VAULT-1021] (#10743) 2021-01-27 09:56:54 -08:00
token_store_util.go The big one (#5346) 2018-09-17 23:03:00 -04:00
ui.go Fix UI custom header values (#10511) 2020-12-15 15:58:03 +01:00
ui_test.go Fix UI custom header values (#10511) 2020-12-15 15:58:03 +01:00
util.go Removed unused methods 2017-01-03 12:51:35 -05:00
util_test.go Utility Enhancements 2016-04-05 20:32:59 -04:00
wrapping.go Revert "Migrate internalshared out (#9727)" (#10141) 2020-10-13 16:38:21 -07:00
wrapping_util.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00