//Module included in the following assemblies:
//
// *installing/installing_two_node_cluster/installing_tnf/install-post-tnf.adoc

:_mod-docs-content-type: REFERENCE
[id="command-line-options-for-fencing-validator-script_{context}"]
= Command-line options for fencing validator script

[role="_abstract"]
To quickly verify a high-availability configuration of your two-node {product-title} cluster with fencing (TNF), you can review the available command-line options and environment variables for the `fencing_validator` script. This reference helps you customize your connection methods, set execution timeouts, and safely test node reboots to ensure your fencing mechanism is reliable before moving to production.

You can see different command-line options for the `fencing_ validator` script by running the following command: 

[source,terminal]
----
$ oc debug node/<node_name> --chroot /host /usr/local/bin/fencing_validator --help
----

The following table details command-line options for the `oc debug node` command:

[cols="1,2", options="header"]
|===
| Flag | Description

| `--user`
| SSH username for remote node access. The default value is `core`. Optionally, you can use `SSH_USER` environment variable to set the value.

| `--ssh-key`
| Path to SSH private key. Optionally, you can use the `SSH_KEY` environment variable to set the value.

| `--kubeconfig`
| Path to kubeconfig file. Optionally, you can use the `KUBECONFIG` environment variable to set the value.

| `--transport`
| How the script connects to the other node. The possible values are `auto`, `ssh`, and `ocdebug`. The default value is `auto`. Optionally, you can use the `TRANSPORT` environment variable to set the value. For more information, see "Transport mode for fencing validator script".

| `--timeout`
| Maximum wait time for recovery loops. Optionally, you can use the `TIMEOUT` environment variable to set the value. By default, it is 1200 seconds or 20 minutes.

| `--hosts`
| Comma-separated pair of node hostnames or IP addresses.

| `--host-a`
| Explicitly set the first node.

| `--host-b`
| Explicitly set the second node.

| `--disruptive`
| Enable destructive fencing tests (reboots nodes). Optionally, you can use the `DISRUPTIVE` environment variable to set the value.

| `--dry-run`
| Show what could be the result of the `fencing_validator` script without doing actual validations. Optionally, you can use the `DRY_RUN` environment variable to set the value.

| `-h`, `--help`
| Show usage information.
|===

You can set all the flags by using the following environment variables:


* `IP_A / IP_B`: set host addresses directly
* `OC_BIN`: custom `oc` binary path
* `OC_REQ_TIMEOUT`: per-API-call timeout. The default value is 10 seconds.
* `CMD_EXEC_TIMEOUT_SECS`: per-command timeout. The default value is 60 seconds.
