FENCE_AGENT(8)

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

πŸ’– fence_gce β€” bestie edition πŸ’–

okay so this is fence_gce(8), a manual page from the System Manager's Manual, and honestly? it's giving "power fencing but make it Google Cloud." sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

fence_gce β€” the fence agent for GCE (Google Cloud Engine). no cap, that's literally the whole name section.


πŸ¦‹ DESCRIPTION πŸ¦‹

so fence_gce is a Power Fencing agent for GCE (Google Cloud Engine). it uses the googleapiclient library to connect to GCE, and like β€” that library can be configured with the Google SDK CLI, or by running:

gcloud auth application-default login

and if you need instructions, the actual docs live at https://cloud.google.com/compute/docs/tutorials/python-guide. go read them, i'll wait πŸ’…

the fence agent accepts options on the command line as well as from stdin. why stdin, you ask? because Fenced sends parameters through stdin when it execs the agent. and the agent can also be run by itself with command line options β€” which is lowkey so useful for testing, and for turning outlets on or off from scripts. main character energy fr.

Vendor URL: http://cloud.google.com

🌸 PARAMETERS 🌸

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

  • -o, --action=[action] β€” the fencing action. (Default Value: reboot)
  • -m, --method=[method] β€” method to fence (onoff|cycle). (Default Value: cycle)
  • -n, --plug=[id] β€” physical plug number on device, UUID or identification of machine. this parameter is always required. periodt.
  • --zone=[name] β€” zone.
  • --project=[name] β€” project ID.
  • --stackdriver-logging β€” stackdriver-logging support.
  • --baremetalsolution β€” if enabled this is a bare metal offering from google.
  • --apitimeout=[seconds] β€” timeout in seconds to use for API calls, default is 60. (Default Value: 60)
  • --retries=[retries] β€” number of retries on failure for API calls, default is 3. (Default Value: 3)
  • --retrysleep=[seconds] β€” time to sleep in seconds between API retries, default is 5. (Default Value: 5)
  • --serviceaccount=[filename] β€” service Account to use for authentication to the google cloud APIs.
  • --plugzonemap=[plugzonemap] β€” comma separated zone map when fencing multiple plugs.
  • --proxyhost=[proxy_host] β€” if a proxy is used for internet access, the proxy host should be specified.
  • --proxyport=[proxy_port] β€” if a proxy is used for internet access, the proxy port should be specified.
  • --earlyexit β€” if an existing reset operation is detected, the fence agent will return before the operation completes with a 0 return code.
  • --warntimeout=[warn_timeout] β€” if the operation is not completed within the timeout, the cluster operations are allowed to continue.
  • --errortimeout=[error_timeout] β€” if the operation is not completed within the timeout, cluster is notified of the operation failure.
  • --runonwarn=[run_on_warn] β€” if a timeout would occur while running the agent, then the supplied command is run.
  • --runonfail=[run_on_fail] β€” if a failure would occur while running the agent, then the supplied command is run.
  • -q, --quiet β€” disable logging to stderr. does not affect --verbose or --debug-file or logging to syslog.
  • -v, --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).
  • -D, --debug-file=[debugfile] β€” write debug information to given file.
  • -V, --version β€” display version information and exit.
  • -h, --help β€” display help and exit.
  • --plug-separator=[char] β€” separator for plug parameter when specifying more than 1 plug. (Default Value: ,)
  • -C, --separator=[char] β€” separator for CSV created by list operation. (Default Value: ,)
  • --delay=[seconds] β€” wait X seconds before fencing is started. (Default Value: 0)
  • --disable-timeout=[true/false] β€” disable timeout (true/false) (default: true when run from Pacemaker 2.0+)
  • --login-timeout=[seconds] β€” wait X seconds for cmd prompt after login. (Default Value: 5)
  • --power-timeout=[seconds] β€” test X seconds for status change after ON/OFF. (Default Value: 60)
  • --power-wait=[seconds] β€” wait X seconds after issuing ON/OFF. (Default Value: 0)
  • --shell-timeout=[seconds] β€” wait X seconds for cmd prompt after issuing command. (Default Value: 3)
  • --stonith-status-sleep=[seconds] β€” sleep X seconds between status calls during a STONITH action. (Default Value: 1)
  • --retry-on=[attempts] β€” count of attempts to retry power on. (Default Value: 1)

πŸ‘‘ ACTIONS πŸ‘‘

the things this agent can do:

  • on β€” power on machine.
  • off β€” power off machine.
  • reboot β€” reboot machine.
  • status β€” this returns the status of the plug/virtual machine.
  • list β€” list available plugs with aliases/virtual machines if there is support for more then one device. returns N/A otherwise.
  • 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 fence device.
  • metadata β€” display the XML metadata describing this resource.
  • manpage β€” the operational behavior of this is not known.
  • validate-all β€” validate if all required parameters are entered.

🌈 STDIN PARAMETERS 🌈

same energy, but these ones come in through stdin (Fenced does this when it execs the agent). notice a bunch of them are the underscore versions of the flags above 🫢

  • action β€” fencing action (Default Value: reboot)
  • method β€” method to fence (onoff|cycle) (Default Value: cycle)
  • plug β€” physical plug number on device, UUID or identification of machine. this parameter is always required. Obsoletes: port
  • zone β€” zone.
  • project β€” project ID.
  • stackdriver_logging β€” stackdriver-logging support. Obsoletes: stackdriver-logging
  • baremetalsolution β€” if enabled this is a bare metal offering from google.
  • apitimeout β€” timeout in seconds to use for API calls, default is 60. (Default Value: 60)
  • retries β€” number of retries on failure for API calls, default is 3. (Default Value: 3)
  • retrysleep β€” time to sleep in seconds between API retries, default is 5. (Default Value: 5)
  • serviceaccount β€” service Account to use for authentication to the google cloud APIs.
  • plugzonemap β€” comma separated zone map when fencing multiple plugs.
  • proxyhost β€” if a proxy is used for internet access, the proxy host should be specified.
  • proxyport β€” if a proxy is used for internet access, the proxy port should be specified.
  • earlyexit β€” if an existing reset operation is detected, the fence agent will return before the operation completes with a 0 return code.
  • warntimeout β€” if the operation is not completed within the timeout, the cluster operations are allowed to continue.
  • errortimeout β€” if the operation is not completed within the timeout, cluster is notified of the operation failure.
  • runonwarn β€” if a timeout would occur while running the agent, then the supplied command is run.
  • runonfail β€” if a failure would occur while running the agent, then the supplied command is run.
  • 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: 60)
  • 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)

aaaand that's the whole page, bestie πŸ’– this one's fence_gce (Fence Agent), dated 2009-10-20, from the FENCE_AGENT(8) manual. slay, go fence something responsibly βœ¨πŸŽ€

πŸ“¦ where this page comes from