Preflight check tool
The preflight check tool is a collection of tests that can be run on a DataStax Enterprise node to detect and fix node configurations. The tool can detect and optionally fix many invalid or suboptimal configuration settings, such as user resource limits, swap, and disk settings.
The default location of the preflight check tool depends on the type of installation:
-
Package installations:
/usr/share/dse/tools/pfc
-
Tarball installations:
<install_location>/tools/pfc
Synopsis
sudo ./preflight_check
[-h] [-f]
[--yaml=<yaml_location>]
[--devices=<HDD_devices>]
[--disk-duration=<disk_duration_in_seconds>]
[--disk-threads=<disk_threads>]
[--ssd=SSD_devices] [--nossd]
Run the preflight check without options to run all tests. |
Definition
The short form and long form parameters are comma-separated.
Command arguments
- --devices=<HDD_devices>
-
Comma separated lists of HDDs: /dev/sda,/dev/sdb,…
- --disk-duration=<disk_duration_in_seconds>
-
Time (in seconds) for each test disk benchmark. Set to simulate a normal load.
- --disk-threads=<disk_threads>
-
Number of threads for each disk benchmark. Set to simulate a normal load.
- -f, -fix
-
Attempt to fix issues.
- -h, -help
-
Show help and exit.
- --nossd
-
The node does not have SSDs.
- --ssd=<SSD_devices>
-
Comma separated lists of SSDs:
/dev/sda,/dev/sdb,…
- --yaml=<yaml_location>
-
Location of
cassandra.yaml
file
Example
Run the preflight check with all tests
sudo ./preflight_check
INFO Blockdev readahead values are within reason.
INFO vm.max_map_count set correctly.
INFO Limits were correctly setup.
INFO '/etc/security/limits.d/90-nproc.conf' does not exist. Shouldn't need this fix.
WARNING Use --ssd or --nossd to signal ssd usage.
ERROR SSD check did not complete successfully.
INFO Swap disabled.
WARNING Please ensure '/var/lib/cassandra/data' and '/var/lib/cassandra/commitlog' are linked to seperate devices.
ERROR Yaml check did not complete successfully.
WARNING Use --device to signal devices to benchmark.
ERROR Disk benchmarks check did not complete successfully.
Creating custom preflight check
Create a custom preflight check to detect and fix specified configuration settings on DataStax Enterprise nodes.
Procedure
-
Create a new Python file in /checks:
cd /checks
touch my_test.py
-
Add the new test to the
all
section of /checks/init.py:__all__ = ['my_test', 'disk', 'blockdev', ...]
-
Add your test to the preflight_check script.
-
Run the preflight check script with the new test:
sudo ./preflight_check [ options ]