Hamid Ghaf
e55c18ed12
adding copyright header ( #19555 )
...
* adding copyright header
* fix fmt and a test
2023-03-15 09:00:52 -07:00
Nick Cabatoff
35df9489c7
Move version out of SDK. ( #14229 )
...
Move version out of SDK. For now it's a copy rather than move: the part not addressed by this change is sdk/helper/useragent.String, which we'll want to remove in favour of PluginString. That will have to wait until we've removed uses of useragent.String from all builtins.
2022-12-07 13:29:51 -05:00
Jeff Mitchell
861454e0ed
Migrate to sdk/internalshared libs in go-secure-stdlib ( #12090 )
...
* Swap sdk/helper libs to go-secure-stdlib
* Migrate to go-secure-stdlib reloadutil
* Migrate to go-secure-stdlib kv-builder
* Migrate to go-secure-stdlib gatedwriter
2021-07-15 20:17:31 -04:00
Nick Cabatoff
4441028471
OSS parts of #1891 (sys/health license addition) ( #11676 )
2021-05-20 13:32:15 -04:00
Lars Lehtonen
36be41d2c3
http: deprecate errwrap.Wrapf() ( #11471 )
2021-04-26 13:33:48 -04:00
Brian Kassouf
a24653cc5c
Run a more strict formatter over the code ( #11312 )
...
* Update tooling
* Run gofumpt
* go mod vendor
2021-04-08 09:43:39 -07:00
Vishal Nayak
96b1aa9929
Fix build
2020-10-26 18:14:01 -04:00
Jeff Mitchell
ced73ab7bf
Consolidate locking for sys/health ( #9876 )
...
* Consolidate locking for sys/health
This avoids a second state lock read-lock on every sys/health hit
* Address review feedback
Co-authored-by: Vishal Nayak <vishalnayakv@gmail.com>
Co-authored-by: Vishal Nayak <vishalnayak@users.noreply.github.com>
2020-10-26 16:47:54 -04:00
Josh Black
af5338b485
Add a new "vault monitor" command ( #8477 )
...
Add a new "vault monitor" command
Co-authored-by: ncabatoff <ncabatoff@hashicorp.com>
Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-05-21 13:07:50 -07:00
Brian Kassouf
c79f90f6b4
Fix build
2019-10-28 17:40:44 -07:00
Jeff Mitchell
eb1f426285
If standbyok/perfstandbyok are provided to sys/health, honor the values ( #7749 )
...
Don't just use the presence of it to indicate behavior.
Fixes #7323
Also, fixes a bug where if an error was returned along with a status
code, the status code was being ignored.
2019-10-28 16:55:20 -07:00
ncabatoff
233ca02dd9
Follow what documentation says we should do if we're a perf standby and perfstandbyok=true ( #7241 )
...
Follow what documentation says we should do if we're a perf standby and perfstandbyok=true, i.e. return 200 instead of 429.
2019-08-05 16:44:41 -04:00
Jeff Mitchell
278bdd1f4e
Switch to go modules ( #6585 )
...
* Switch to go modules
* Make fmt
2019-04-13 03:44:06 -04:00
Jeff Mitchell
170521481d
Create sdk/ and api/ submodules ( #6583 )
2019-04-12 17:54:35 -04:00
Jeff Mitchell
bc33dbd13d
Add LastWAL in leader/health output ( #5523 )
2018-10-16 09:38:44 -04:00
Brian Kassouf
e5aaf80764
Fix http tests ( #5195 )
2018-08-27 15:13:41 -07:00
Jeff Mitchell
8d2d9fd8bd
Tackle #4929 a different way ( #4932 )
...
* Tackle #4929 a different way
This turns c.sealed into an atomic, which allows us to call sealInternal
without a lock. By doing so we can better control lock grabbing when a
condition causing the standby loop to get out of active happens. This
encapsulates that logic into two distinct pieces (although they could
be combined into one), and makes lock guarding more understandable.
* Re-add context canceling to the non-HA version of sealInternal
* Return explicitly after stopCh triggered
2018-07-24 13:57:25 -07:00
Jeff Mitchell
a109e2a11e
Sync some bits over
2018-01-22 21:44:49 -05:00
Jeff Mitchell
2fea072515
Log sys/health errors
2018-01-19 19:59:58 -05:00
Jeff Mitchell
e9d5863a2e
Use a separate var for active node replication state ( #3819 )
2018-01-19 19:24:04 -05:00
Brian Kassouf
8142b42d95
Add context to storage backends and wire it through a lot of places ( #3817 )
2018-01-19 01:44:44 -05:00
Jeff Mitchell
41d32e998a
replication state -> replication mode in sys/health
2018-01-17 22:38:03 -05:00
Jeff Mitchell
ba219f4917
Add replication state to EchoReply ( #3810 )
2018-01-17 22:17:47 -05:00
Jeff Mitchell
9f97cb8f94
Port IsDRSecondary over and enable returning it via sys_health ( #3749 )
2018-01-03 15:07:13 -05:00
Jeff Mitchell
3e7a3acb22
Change some instances of adding headers to setting headers, since really ( #3501 )
...
we want to replace anything that might be there (e.g. for request
forwarding and content-type).
Hopefully fixes #3485
2017-11-02 07:31:50 -05:00
vishalnayak
ee26c7e7b6
Remove the string 'Vault' from version information
2016-09-01 14:54:04 -04:00
Jeff Mitchell
58a7c8999e
Change uninit/sealed status codes from health endpoint
2016-08-18 12:10:23 -04:00
vishalnayak
baa1a1c9cf
Address review feedback from @jefferai
2016-08-10 15:22:12 -04:00
vishalnayak
a9155e8038
Fix Cluster object being returned as nil when unsealed
2016-08-10 15:09:16 -04:00
vishalnayak
ebbbe8edcb
Error out if cluster information is nil when Vault is unsealed
2016-07-26 15:30:38 -04:00
vishalnayak
415c463a87
Added omitempty to ClusterName and ClusterID
2016-07-26 14:11:32 -04:00
vishalnayak
a64fa19a0e
Address review feedback from @jefferai
2016-07-26 14:05:27 -04:00
vishalnayak
e5c61509d6
Remove global name/id. Make only cluster name configurable.
2016-07-26 10:01:35 -04:00
vishalnayak
55cf44bc91
Storing local and global cluster name/id to storage and returning them in health status
2016-07-26 02:32:42 -04:00
vishalnayak
96155753c4
Add version information to health status
2016-07-22 18:28:16 -04:00
Daniel Stelter-Gliese
f63098bb21
Support HEAD requests to /v1/sys/health
...
Some load balancers send HTTP HEAD requests to extract the status code.
2016-06-09 18:16:28 +02:00
vishalnayak
84809e39ca
Refactor fetching sys/health parameters
2016-03-11 09:52:31 -05:00
Jeff Mitchell
ace5dd495b
Add query parameters to /sys/health
to specify return codes.
...
Fixes #1199
2016-03-11 00:41:25 -05:00
Jeff Mitchell
a8a227b97a
Add the server's time in UTC to the health response.
2016-02-22 19:51:18 -05:00
Armon Dadgar
d77efbd716
http: support ?standbyok for 200 status on standby. Fixes #389
2015-07-02 17:49:35 -07:00
Armon Dadgar
253ebffe78
http: adding sys/health endpoint
2015-04-23 11:53:31 -07:00