22 Commits

Author SHA1 Message Date
Nick Cabatoff
1b8606d9ec
Minor improvements to test cluster libraries (#25329)
Add WaitForMatchingMerkleRootsClients and Clients to sdk testcluster.  Fix internal TestCluster.SetRootToken, which wasn't updating the builtin clients' token.
2024-02-09 09:45:43 -05:00
Josh Black
ef26498e9c
Implement raft-wal (#21460)
* Implement raft-wal

* go mod tidy

* add metrics, fix a panic

* fix the panic for real this time

* PR feedback

* refactor tests to use a helper and reduce duplication

* add a test to verify we don't use raft-wal if raft.db exists

* add config to enable the verifier

* add tests for parsing verification intervals

* run the verifier in the background

* wire up the verifier

* go mod tidy

* refactor config parsing

* remove unused function

* trying to get the verifier working

* wire up some more verifier bits

* sorted out an error, added a new test, lots of debug logging that needs to come out

* fix a bug and remove all the debugging statements

* make sure we close raft-wal stablestore too

* run verifier tests for both boltdb and raft-wal

* PR feedback

* Vault 20270 docker test raft wal (#24463)

* adding a migration test from boltdb to raftwal and back
adding a migration test using snapshot restore

* feedback

* Update physical/raft/raft.go

Co-authored-by: Paul Banks <pbanks@hashicorp.com>

* PR feedback

* change verifier function

* make this shorter

* add changelog

* Fix Close behavior

* make supporting empty logs more explicit

* add some godocs

---------

Co-authored-by: hamid ghaf <hamid@hashicorp.com>
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2024-01-25 10:08:50 -08:00
miagilepner
49a59bda5e
Fix api/ and sdk/ package tests (#25067)
* fix

* left in incorrectly

* don't print generate commands

* handle line breaks

* remove -e
2024-01-25 14:45:44 +01:00
Nick Cabatoff
423b58c90b
Simplify raft cluster address management in tests (#24560) 2023-12-18 09:42:23 -05:00
Nick Cabatoff
b8f531142b
Use our heartbeat echo RPCs to estimate clock skew, expose it in status APIs (#24343) 2023-12-04 12:04:38 -05:00
Rachel Culpepper
73df860e90
Vault-14651: add function for restarting cluster nodes (#24335)
* add function for restarting cluster nodes

* fix import
2023-12-01 22:07:44 +00:00
Nick Cabatoff
22a2e74fcc
Fix error not being handled when creating a docker cluster. (#24136) 2023-11-15 14:09:06 +00:00
modrake
eca4b4d801
Relplat 897 copywrite fixes for mutliple licenses (#23722) 2023-10-20 08:40:43 -07:00
Paul Banks
0fa36a36ae
Prevent split-brain active node writes when using Consul (#23013)
* Add test to demonstrate a split-brain active node when using Consul

* Add Consul session check to prevent split-brain updates

* It's not right

Co-authored-by: Josh Black <raskchanky@gmail.com>

---------

Co-authored-by: Josh Black <raskchanky@gmail.com>
2023-09-22 16:16:01 +01:00
divyaac
d5b29f697a
Chroot Listener (#22304)
* Initial oss-patch apply

* Added changelog

* Renamed changelog txt

* Added the imports to the handler file

* Added a check that no two ports are the same, and modified changelog

* Edited go sum entry

* Tidy up using go mod

* Use strutil instead

* Revert go sum and go mod

* Revert sdk go sum

* Edited go.sum to before

* Edited go.sum again to initial

* Revert changes
2023-08-14 12:35:34 -07:00
Bianca Moreira
4c1a7b53d3
Add high privilege namespace (#21215) 2023-07-06 09:51:43 +02:00
Hamid Ghaf
f0292fa2e4
OSS part of replication sys method (#20995)
* OSS part of replication sys method

* CL
2023-06-05 14:39:40 -07:00
Hamid Ghaf
288399f228
OSS portion of additional DR failover tests (#20842) 2023-05-30 08:41:33 -07:00
Nick Cabatoff
356b3899bb
Cluster test helper improvements (#20424) 2023-05-24 20:21:10 +00:00
Hamid Ghaf
f8ccaac856
adding support for four cluster docker based test scenario (#20492) 2023-05-03 10:49:45 -07:00
Alexander Scheel
a5bca6a122
Add dns resolver to PKI Binary Cluster (#20485)
* Export DockerAPI for use by other consumers

As usage of DockerCluster gets more advanced, some users may want to
interact with the container nodes of the cluster. While, if you already
have a DockerAPI instance lying around you can reuse that safely, for
use cases where an existing e.g., docker/testhelpers's runner instance
is not available, reusing the existing cluster's DockerAPI is easiest.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add ability to exec commands without runner

When modifying DockerTestCluster's containers manually, we might not
have a Runner instance; instead, expose the ability to run commands via
a DockerAPI instance directly, as they're awfully convenient.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add DNS resolver into ACME tests

This updates the pkiext_binary tests to use an adjacent DNS resolver,
allowing these tests to eventually be extended to solve DNS challenges,
as modifying the /etc/hosts file does not allow this.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix loading DNS resolver onto network

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix bug with DNS configuration validation

Both conditionals here were inverted: address being empty means a bad
specification was given, and the parse being nil means that it was not a
valid IP address.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix specifying TXT records, allow removing records

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-03 17:32:39 +00:00
Nick Cabatoff
781d43e91c
Simple perf replication test using docker containers (#20393) 2023-04-28 19:43:30 +00:00
Nick Cabatoff
a65597aa59
Add support for restarting docker nodes, and for providing args (#20409) 2023-04-28 14:03:14 -04:00
Nick Cabatoff
f4c881726f
Don't require every test to specify a VaultLicense field (#20372) 2023-04-26 18:39:48 +00:00
Nick Cabatoff
445e2e91c6
Docker testing: handle licensing, different images per node (#20347) 2023-04-25 17:11:46 -04:00
Nick Cabatoff
2f0929f3ab
Add support for docker testclusters (#20247) 2023-04-24 14:25:50 -04:00
Nick Cabatoff
980f1e0aae
Add tests based on vault binary (#20224)
First steps towards docker-based tests: tests using vault binary in -dev or -dev-three-node modes.
2023-04-24 09:57:37 -04:00