Commit Graph

82 Commits

Author SHA1 Message Date
Markus Pilman 189007fb86 remove obsolete todo from code 2022-11-15 09:39:41 -07:00
Markus Pilman f0b12d5d4c Enable attrition injection 2022-11-14 12:40:03 -07:00
Markus Pilman 7acf945cd1 Disable attrition injection again to unblock PR 2022-11-08 12:14:36 -07:00
Markus Pilman f1fea14255 Merge remote-tracking branch 'origin/main' into bugfixes/machines-attrition-debugging 2022-11-01 13:51:35 -06:00
Lukas Joswiak 1fca3b7ddc Modify how cluster ID tests are run in simulation 2022-10-27 13:56:13 -07:00
Lukas Joswiak 5ca2b89bdf Fix simulation issue where process switch was ignored
The simulator tracks only active processes. Rebooted or killed processes
are removed from the list of processes, and only get added back when the
process is rebooted and starts up again. This causes a problem for the
`RebootProcessAndSwitch` kill type, which wants to simultaneously reboot
all machines in a cluster and change their cluster file. If a machine is
currently being rebooted, it will miss the reboot process and switch
command.

The fix is to add a check when a process is being started in simulation.
If the process has had its cluster file changed and the cluster is in a
state where all processes should have had their cluster files reverted
to the original value, the simulator will now send a
`RebootProcessAndSwitch` signal right when the process is started. This
will cause an extra reboot, but should correctly switch the process back
to its original, correct cluster file, allowing the cluster to fully
recover all clusters.

Note that the above issue should only affect simulation, due to how the
simulator tracks processes and handles kill signals.

This commit also adds a field to each process struct to determine
whether the process is being run in a DR cluster in the simulation run.
This is needed because simulation does not differentiate between
processes in different clusters (other than by the IP), and some
processes needed to switch clusters and some simply needed to be
rebooted.
2022-10-27 13:56:13 -07:00
Lukas Joswiak a72066be33 Add simulation support for changing the cluster file 2022-10-27 13:56:13 -07:00
Jingyu Zhou a8391caf23 Revert "Data loss protection v2" 2022-10-20 18:09:58 -05:00
Markus Pilman d1c80659b5 Remember disk corruptions and downgrade trace severity if a corruption was injected 2022-10-19 16:18:00 -06:00
Lukas Joswiak cf6c5c3a47 Modify how cluster ID tests are run in simulation 2022-10-18 21:37:42 -07:00
Lukas Joswiak 7f889c87e3 Fix simulation issue where process switch was ignored
The simulator tracks only active processes. Rebooted or killed processes
are removed from the list of processes, and only get added back when the
process is rebooted and starts up again. This causes a problem for the
`RebootProcessAndSwitch` kill type, which wants to simultaneously reboot
all machines in a cluster and change their cluster file. If a machine is
currently being rebooted, it will miss the reboot process and switch
command.

The fix is to add a check when a process is being started in simulation.
If the process has had its cluster file changed and the cluster is in a
state where all processes should have had their cluster files reverted
to the original value, the simulator will now send a
`RebootProcessAndSwitch` signal right when the process is started. This
will cause an extra reboot, but should correctly switch the process back
to its original, correct cluster file, allowing the cluster to fully
recover all clusters.

Note that the above issue should only affect simulation, due to how the
simulator tracks processes and handles kill signals.

This commit also adds a field to each process struct to determine
whether the process is being run in a DR cluster in the simulation run.
This is needed because simulation does not differentiate between
processes in different clusters (other than by the IP), and some
processes needed to switch clusters and some simply needed to be
rebooted.
2022-10-18 21:37:42 -07:00
Lukas Joswiak 43854c5ac8 Add simulation support for changing the cluster file 2022-10-18 21:37:16 -07:00
Markus Pilman 7457c5059b Merge remote-tracking branch 'origin/main' into bugfixes/machines-attrition-debugging
# Conflicts:
#	fdbserver/workloads/GetMappedRange.actor.cpp
2022-10-17 14:39:46 -06:00
Markus Pilman 49f0cf5ab0 Force name and description of workloads to be the same 2022-10-13 20:53:48 -06:00
Markus Pilman cfbc263c0a Enable attrition injection 2022-10-13 14:38:36 -06:00
sfc-gh-tclinkenbeard 2434f18c5c Enable failure injection for all simulation tests 2022-09-29 14:14:24 -07:00
Hui Liu c9b4fc5761 disallow MoveKeysWorkload running in parallel 2022-09-22 17:00:01 -07:00
A.J. Beamon 4fd64630e8 Convert literal string ref instances to use _sr suffix 2022-09-19 11:35:58 -07:00
Markus Pilman e1627e0a78 Merge remote-tracking branch 'origin/main' into features/always-inject-faults 2022-09-19 09:38:55 -06:00
Markus Pilman 9441795c8e address review comments 2022-09-16 14:40:10 -06:00
sfc-gh-tclinkenbeard 82adc1e856 Make g_simulator a pointer 2022-09-15 09:00:33 -07:00
Markus Pilman bef5b87472 add clogging workload 2022-08-08 14:30:41 -06:00
Markus Pilman 2f7e6ee278 don't do failure injection for change config and quiescence tests 2022-08-03 17:04:06 -06:00
Markus Pilman 31f05f2fdf Separated normal workloads and failure injection
Also first implementation with machine attrition
2022-08-02 17:04:02 -06:00
Markus Pilman 1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
Dan Adkins bd47f390bd
Add simulation test for three_data_hall configuration (#7305)
* Add simulation test for 1 data hall + 1 machine failure case.

* Disable BUGGIFY for DEGRADED_RESET_INTERVAL.

A simulation test discovered a situation where machines attempting to connect
to a dead coordinator (with a well-known endpoint) were getting themselves
marked degraded. This flapping of the degraded state prevented recovery from
completing, as it started over any time it noticed that tlogs on degraded
hosts could be relocated to non-degraded ones.

bin/fdbserver -r simulation -f tests/rare/CycleWithDeadHall.toml -b on -s 276841956
2022-06-06 13:14:49 -07:00
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
A.J. Beamon 81e8c7c362 Various test fixes to work with tenants. 2022-03-17 12:10:18 -07:00
Xiaoge Su abf73047ca Enforce std:: specifier rather than using namespace 2021-09-16 19:40:28 -07:00
Steve Atherton 507c1f11e3 Add .log() to bare TraceEvent() invocations without any .detail()s to avoid clang-tidy warning about immediate destruction of object without use. 2021-07-26 19:55:10 -07:00
Sajjad Rahnama e04646e267 Fault Injection Active/Deactivation 2021-07-23 16:28:20 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
A.J. Beamon aaf0a9aa7b Merge branch 'release-6.3' into merge-release-6.3-into-master
# Conflicts:
#	build/docker-compose.yaml
#	cmake/ConfigureCompiler.cmake
#	fdbclient/FileBackupAgent.actor.cpp
#	fdbrpc/AsyncFileCached.actor.h
#	fdbrpc/IAsyncFile.h
#	fdbrpc/IRateControl.h
#	fdbrpc/simulator.h
#	fdbserver/KeyValueStoreSQLite.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbservice/ServiceBase.cpp
2021-02-08 12:58:34 -08:00
A.J. Beamon 67e783acf8 Merge branch 'release-6.2' into merge-release-6.2-into-release-6.3
# Conflicts:
#	cmake/CompileBoost.cmake
#	cmake/FDBComponents.cmake
#	fdbrpc/AsyncFileCached.actor.h
#	fdbrpc/simulator.h
#	fdbserver/KeyValueStoreSQLite.actor.cpp
#	fdbserver/Knobs.cpp
#	fdbserver/Knobs.h
#	fdbserver/storageserver.actor.cpp
#	flow/Knobs.h
#	flow/network.h
2021-02-08 09:20:28 -08:00
Evan Tschannen 40d855943c temporarily disable disk stalls in simulation 2021-02-02 17:33:47 -08:00
Evan Tschannen 36e4f82115 more complete support for simulated disk failures 2021-01-27 14:29:43 -08:00
sfc-gh-tclinkenbeard 7f0d14c8e4 Modernize/refactor workloads directory 2020-10-04 22:29:07 -07:00
Evan Tschannen 07cc0a8d74 code cleanup 2020-04-10 17:02:11 -07:00
Jon Fu ff19e11b40 added more parameters 2019-11-20 15:11:18 -08:00
Jon Fu c8a4ad0412 added live duration before kill and changed naming of variables from machine to worker 2019-11-20 10:46:00 -08:00
Jon Fu bdbd887fa5 revise some trace lines 2019-11-08 15:09:09 -08:00
Jon Fu 2147401a21 added function lambda and ability to specify zone kill 2019-11-08 15:05:18 -08:00
Jon Fu 489a98c62b use vector of targets and removed randomization from specified kill types (dc, datahall, etc.) 2019-11-08 13:56:39 -08:00
Jon Fu da1a70e19a fix check for killable processes 2019-11-05 13:57:32 -08:00
Jon Fu 72ad8c5f99 only randomize killdc option under simulation 2019-11-05 13:31:47 -08:00
Jon Fu ba2c5dd2a6 first draft of adding option to kill processes 2019-11-04 15:46:45 -08:00
Jon Fu d9d1cdc470 removed delay before kill 2019-11-04 11:19:39 -08:00
Andrew Noyes d4de608bb6 Fix OPEN_FOR_IDE build 2019-10-25 10:42:22 -07:00
Jon Fu 5d7c84b803 moved shuffle outside of the conditional blocks 2019-10-24 09:45:04 -07:00
Jon Fu ab262e5e4d use StringRef over std::string for workload params 2019-10-23 14:55:28 -07:00