Commit Graph

22 Commits

Author SHA1 Message Date
Jeff Mitchell
9ca558c303 Update lease renewer logic (#4090)
* Add grace period calculation logic to renewer

* Update lease renewer logic.

It is believed by myself and members of the Nomad team that this logic
should be much more robust in terms of causing large numbers of new
secret acquisitions caused by a static grace period. See comments in the
code for details.

Fixes #3414

* Fix some commenting and fix tests

* Add more time to test so that integ tests don't time out

* Fix some review feedback
2018-03-19 15:48:24 -04:00
Nándor István Krácser
a439005a30 Fix typo (remove +is) (#4104) 2018-03-08 11:01:07 -05:00
Gobin Sougrakpam
fbb0c633e9 Fix renewAuth to use the increment value (#3904) 2018-02-05 12:22:49 -05:00
Jeff Mitchell
b80af5a993 Fix up comment 2017-12-18 10:11:24 -05:00
jaloren
8feb6e2c9d Support Incrementing Lease TTL in Renew api (#3688) 2017-12-18 10:09:59 -05:00
Seth Vargo
77fccbdd68 Do not double-convert to seconds 2017-07-11 16:06:50 -07:00
Seth Vargo
2fbb19285b Fix typo 2017-07-10 22:26:42 -07:00
Seth Vargo
c29e85125d Fix doc 2017-07-07 17:15:43 -04:00
Seth Vargo
da9d57f5f1 Buffer doneCh 2017-07-07 17:14:49 -04:00
Seth Vargo
dfb6166cd8 Add configurable buffer size 2017-07-07 17:14:48 -04:00
Seth Vargo
54224b06dc Do not block writing to doneCh if stopped 2017-07-07 17:14:48 -04:00
Seth Vargo
ce43621894 Make lock private 2017-07-07 17:14:48 -04:00
Seth Vargo
b2b9cdfdeb Remove init() seed 2017-07-07 17:14:47 -04:00
Seth Vargo
c0b2d41d8f Allow a custom randomizer 2017-07-07 17:14:47 -04:00
Seth Vargo
3d74752524 Use a more heurstic function for calculating sleep backoff 2017-07-07 17:14:46 -04:00
Seth Vargo
a8fe164694 Seed the random generator 2017-07-07 17:14:46 -04:00
Seth Vargo
de0250a66f Send a more useful struct for renewal 2017-07-07 17:14:45 -04:00
Seth Vargo
f9465a8a5b Reorg 2017-07-07 17:14:45 -04:00
Seth Vargo
320d76422a Use unbuffered channels 2017-07-07 17:14:45 -04:00
Seth Vargo
7e08052e14 Use a time.Duration instead of an int for grace 2017-07-07 17:14:44 -04:00
Seth Vargo
42354aed99 Use RenewTokenAsSelf instead 2017-07-07 17:14:44 -04:00
Seth Vargo
dcbd729afa Add secret renewer 2017-07-07 17:14:44 -04:00