FENCE_AGENT(8)

πŸ“¦
version 4.17.0 Β· 3 versions
, in debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FENCE_AGENT(8) β€” the fence_sanbox2 era πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about fence_sanbox2 from the System Manager's Manual, section 8. yes it's a fencing agent. no it's not about swords. well. kind of about swords. πŸ—‘οΈβœ¨


🌸 NAME 🌸

fence_sanbox2 β€” the fence agent for QLogic SANBox2 FC switches, and she is serving. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so fence_sanbox2 is an I/O Fencing agent, right, and she's built to hang out with QLogic SANBox2 FC switches. what she does is she logs into a SANBox2 switch via telnet and then disables a specified port. and the way that disabling the port a machine is connected to effectively fences that machine β€” like, that's the whole thing, that's the vibe. πŸŽ€

real talk though: lengthy telnet connections to the switch should be avoided while a GFS cluster is running, because that connection will block any necessary fencing actions. so don't be extra about it. 😭

the fence agent accepts options on the command line as well as from stdin, which is very main character of her. Fenced sends parameters through stdin when it execs the agent. but you can also run the agent by itself with command line options, and that's lowkey useful for testing and for turning outlets on or off from scripts. iykyk. 🫢

Vendor URL: http://www.qlogic.com β€” go say hi. 🌈


✨ PARAMETERS ✨

here's the lineup, every single one, no skips, periodt:

  • -o, --action=[action] β€” the fencing action, bestie. (Default Value: off)
  • -c, --command-prompt=[prompt] β€” force a Python regex for the command prompt. yes, a regex. (Default Value: [' #> '])
  • -a, --ip=[ip] β€” IP address or hostname of the fencing device. This parameter is always required. no ip, no service. πŸ’€
  • -u, --ipport=[port] β€” the TCP/UDP port used to connect with the device. (Default Value: 23)
  • -p, --password=[password] β€” login password or passphrase. secrets stay secrets. πŸ™ˆ
  • -S, --password-script=[script] β€” a script to run to go retrieve that password.
  • -n, --plug=[id] β€” physical plug number on the device, UUID, or identification of the machine. This parameter is always required.
  • -l, --username=[name] β€” login name. This parameter is always required. hello, it's me. πŸ‘‘
  • -q, --quiet β€” disable logging to stderr. and just so we're clear: this does not affect --verbose or --debug-file or logging to syslog. she's selective. πŸ’…
  • -v, --verbose β€” verbose mode. and you can stack multiple -v flags on the command line (e.g., -vvv) to crank the verbosity up. more v's, more words. πŸ”₯
  • --verbose-level β€” the level of debugging detail in the output. defaults to the number of --verbose flags you specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin).
  • -D, --debug-file=[debugfile] β€” write debug information into the given file. πŸ“
  • -V, --version β€” display version information and exit. bye!
  • -h, --help β€” display help and exit. also bye!
  • --plug-separator=[char] β€” the separator for the plug parameter when you're specifying more than 1 plug. (Default Value: ,)
  • -C, --separator=[char] β€” the separator for the CSV created by the list operation. (Default Value: ,)
  • --delay=[seconds] β€” wait X seconds before the fencing is started. (Default Value: 0)
  • --disable-timeout=[true/false] β€” disable the timeout (true/false). (default: true when run from Pacemaker 2.0+)
  • --login-timeout=[seconds] β€” wait X seconds for the cmd prompt after login. (Default Value: 5)
  • --power-timeout=[seconds] β€” test X seconds for a status change after ON/OFF. (Default Value: 20)
  • --power-wait=[seconds] β€” wait X seconds after issuing ON/OFF. (Default Value: 0)
  • --shell-timeout=[seconds] β€” wait X seconds for the cmd prompt after issuing a command. (Default Value: 3)
  • --stonith-status-sleep=[seconds] β€” sleep X seconds between status calls during a STONITH action. (Default Value: 1)
  • --retry-on=[attempts] β€” the count of attempts to retry power on. (Default Value: 1)
  • --telnet-path=[path] β€” the path to the telnet binary. (Default Value: /usr/bin/telnet)

πŸŽ€ ACTIONS πŸŽ€

the moves she can make. pick your fighter:

  • on β€” power on the machine. ⭐
  • off β€” power off the machine.
  • status β€” this returns the status of the plug/virtual machine.
  • list β€” list available plugs with aliases/virtual machines if there's support for more than one device. returns N/A otherwise. sometimes the answer is just N/A and that's okay. 😭
  • list-status β€” list available plugs with aliases/virtual machines and their power state, if it can be obtained without additional commands.
  • monitor β€” check the health of the fence device. wellness check. 🩺
  • metadata β€” display the XML metadata describing this resource.
  • manpage β€” the operational behavior of this is not known. (yes, really, that's the note. we're being honest here. πŸ’€)
  • validate-all β€” validate whether all required parameters are entered.

🌈 STDIN PARAMETERS 🌈

same energy, snake_case edition. Fenced sends these through stdin:

  • action β€” fencing action (Default Value: off)
  • command_prompt β€” force Python regex for command prompt (Default Value: [' #> ']). Obsoletes: cmd_prompt
  • ip β€” IP address or hostname of fencing device. This parameter is always required. Obsoletes: ipaddr
  • ipport β€” TCP/UDP port to use for connection with device (Default Value: 23)
  • password β€” login password or passphrase. Obsoletes: passwd
  • password_script β€” script to run to retrieve password. Obsoletes: passwd_script
  • plug β€” physical plug number on device, UUID or identification of machine. This parameter is always required. Obsoletes: port
  • username β€” login name. This parameter is always required. Obsoletes: login
  • quiet β€” disable logging to stderr. does not affect --verbose or --debug-file or logging to syslog.
  • verbose β€” verbose mode. multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity.
  • verbose_level β€” level of debugging detail in output. defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin).
  • debug_file β€” write debug information to given file. Obsoletes: debug
  • version β€” display version information and exit
  • help β€” display help and exit
  • plug_separator β€” separator for plug parameter when specifying more than 1 plug (Default Value: ,)
  • separator β€” separator for CSV created by list operation (Default Value: ,)
  • delay β€” wait X seconds before fencing is started (Default Value: 0)
  • disable_timeout β€” disable timeout (true/false) (default: true when run from Pacemaker 2.0+)
  • login_timeout β€” wait X seconds for cmd prompt after login (Default Value: 5)
  • power_timeout β€” test X seconds for status change after ON/OFF (Default Value: 20)
  • power_wait β€” wait X seconds after issuing ON/OFF (Default Value: 0)
  • shell_timeout β€” wait X seconds for cmd prompt after issuing command (Default Value: 3)
  • stonith_status_sleep β€” sleep X seconds between status calls during a STONITH action (Default Value: 1)
  • retry_on β€” count of attempts to retry power on (Default Value: 1)
  • telnet_path β€” path to telnet binary (Default Value: /usr/bin/telnet)

okay that's the whole page, you ate it, no crumbs left. πŸ’– and for the record, this little masterpiece is fence_sanbox2 (Fence Agent), dated 2009-10-20, living its best life under FENCE_AGENT(8). iconic behavior, honestly. mwah. 🫢✨

πŸ“¦ where this page comes from