FENCE_AGENT(8)

πŸ“¦ version 4.17.0, in fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– fence_agent β€” the fence_aws_vpc_net page, bestie edition πŸ’–

okay so this is from the System Manager's Manual section, manual page FENCE_AGENT(8), and today's main character is fence_aws_vpc_net. Buckle up. πŸŽ€


✨ NAME ✨

fence_aws_vpc_net β€” the fence agent for AWS (Amazon Web Services) Net. that's it, that's the name. πŸ¦‹


🌸 DESCRIPTION 🌸

fence_aws_vpc is a Network and Power Fencing agent for AWS VPC, and the way it does its thing is by manipulating security groups. iconic behaviour honestly. it uses the boto3 library to connect to AWS. πŸ’…

boto3 can be configured with the AWS CLI, or by creating ~/.aws/credentials. for the actual instructions, go look here:

https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration
NOTE: if onfence-poweroff is set, the agent won't be able to power on the node again. it will have to be powered on manually, or with other automation. so like… be aware. 😭

the fence agent accepts options on the command line and from stdin. fenced sends parameters through stdin when it execs the agent. and you can absolutely run the agent by itself with command line options β€” that's lowkey so useful for testing, and for turning outlets on or off from scripts. 🫢

Vendor URL: http://www.amazon.com


⭐ PARAMETERS ⭐

  • -o, --action=[action] β€” the fencing action you want. (Default Value: reboot)
  • -n, --plug=[id] β€” the AWS Instance ID to perform the action on. this parameter is always required, no skipsies. πŸ‘‘
  • -r, --region=[region] β€” AWS Region.
  • -a, --access-key=[key] β€” AWS Access Key.
  • -s, --secret-key=[key] β€” AWS Secret Key.
  • --secg=[sg1,sg2,...] β€” security groups to remove.
  • --skip-race-check β€” skip the race condition check.
  • --invert-sg-removal β€” remove all security groups except the specified ones.
  • --unfence-ignore-restore β€” remove all security groups except specified..
  • --filter=[key=value] β€” filter for list-action.
  • -b, --boto3_debug=[option] β€” Boto Lib debug. (Default Value: False)
  • --onfence-poweroff β€” power off the machine async..
  • --ignore-tag-write-failure β€” keep going with fencing even if the backup tag fails..
  • --ignore-instance-state β€” fence regardless of AWS state.
  • --interface0-sg=[sg1,sg2,...] β€” security groups to restore for interface 0 (bypasses tag logic).
  • --interface1-sg=[sg1,sg2,...] β€” security groups to restore for interface 1 (bypasses tag logic).
  • --interface2-sg=[sg1,sg2,...] β€” security groups to restore for interface 2 (bypasses tag logic).
  • --interface3-sg=[sg1,sg2,...] β€” security groups to restore for interface 3 (bypasses tag logic).
  • --interface4-sg=[sg1,sg2,...] β€” security groups to restore for interface 4 (bypasses tag logic).
  • --interface5-sg=[sg1,sg2,...] β€” security groups to restore for interface 5 (bypasses tag logic).
  • --interface6-sg=[sg1,sg2,...] β€” security groups to restore for interface 6 (bypasses tag logic).
  • --interface7-sg=[sg1,sg2,...] β€” security groups to restore for interface 7 (bypasses tag logic).
  • --interface8-sg=[sg1,sg2,...] β€” security groups to restore for interface 8 (bypasses tag logic).
  • --interface9-sg=[sg1,sg2,...] β€” security groups to restore for interface 9 (bypasses tag logic).
  • --interface10-sg=[sg1,sg2,...] β€” security groups to restore for interface 10 (bypasses tag logic).
  • --interface11-sg=[sg1,sg2,...] β€” security groups to restore for interface 11 (bypasses tag logic).
  • --interface12-sg=[sg1,sg2,...] β€” security groups to restore for interface 12 (bypasses tag logic).
  • --interface13-sg=[sg1,sg2,...] β€” security groups to restore for interface 13 (bypasses tag logic).
  • --interface14-sg=[sg1,sg2,...] β€” security groups to restore for interface 14 (bypasses tag logic).
  • --interface15-sg=[sg1,sg2,...] β€” security groups to restore for interface 15 (bypasses tag logic).
  • -q, --quiet β€” disable logging to stderr. does not affect --verbose, or --debug-file, or logging to syslog. πŸ’€
  • -v, --verbose β€” verbose mode. you can stack multiple -v flags on the command line (like, e.g., -vvv) to crank up the verbosity.
  • --verbose-level β€” level of debugging detail in the output. defaults to however many --verbose flags you put 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 the given file.
  • -V, --version β€” display version information and exit.
  • -h, --help β€” display help and exit.
  • --plug-separator=[char] β€” separator for the plug parameter when you're specifying more than 1 plug. (Default Value: ,)
  • -C, --separator=[char] β€” separator for the CSV created by the 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 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] β€” count of attempts to retry power on. (Default Value: 1)

πŸ¦‹ ACTIONS πŸ¦‹

  • 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's support for more than 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 the 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.

to be continued, bestie β€” there's more of this page coming so don't go anywhere πŸ’œ

✨ STDIN PARAMETERS ✨

okay bestie these are the params that come in through stdin β€” that's how Pacemaker/stonith hands stuff to the agent, iykyk πŸ’Œ every one of them, no skipping, we go down the whole list together 🫢

  • action β€” the fencing action we're doing. Default value: reboot πŸ”„
  • plug β€” the AWS Instance ID we're performing the action on. This one is always required, no exceptions, it's the whole point. Obsoletes: port πŸ’…
  • region β€” the AWS Region.
  • access_key β€” your AWS Access Key.
  • secret_key β€” your AWS Secret Key. yes it's secret. guard it with your life πŸ™ˆ
  • secg β€” the Security Groups to remove.
  • skip_race_check β€” skip the race condition check. πŸƒβ™€οΈ
  • invert_sg_removal β€” Remove all security groups except specified.. Obsoletes: invert-sg-removal
  • unfence_ignore_restore β€” Remove all security groups except specified.. Obsoletes: unfence-ignore-restore
  • filter β€” Filter for list-action.
  • boto3_debug β€” Boto Lib debug. Default value: False 🐍
  • onfence_poweroff β€” Power off the machine async.. Obsoletes: onfence-poweroff
  • ignore_tag_write_failure β€” Continue to fence even if the backup tag fails.. Obsoletes: ignore-tag-write-failure
  • ignore_instance_state β€” Fence regardless of AWS state. Obsoletes: ignore-instance-state
  • interface0_sg β€” Security Groups to restore for interface 0 (bypasses tag logic). Obsoletes: interface0-sg
  • interface1_sg β€” Security Groups to restore for interface 1 (bypasses tag logic). Obsoletes: interface1-sg
  • interface2_sg β€” Security Groups to restore for interface 2 (bypasses tag logic). Obsoletes: interface2-sg
  • interface3_sg β€” Security Groups to restore for interface 3 (bypasses tag logic). Obsoletes: interface3-sg
  • interface4_sg β€” Security Groups to restore for interface 4 (bypasses tag logic). Obsoletes: interface4-sg
  • interface5_sg β€” Security Groups to restore for interface 5 (bypasses tag logic). Obsoletes: interface5-sg
  • interface6_sg β€” Security Groups to restore for interface 6 (bypasses tag logic). Obsoletes: interface6-sg
  • interface7_sg β€” Security Groups to restore for interface 7 (bypasses tag logic). Obsoletes: interface7-sg
  • interface8_sg β€” Security Groups to restore for interface 8 (bypasses tag logic). Obsoletes: interface8-sg
  • interface9_sg β€” Security Groups to restore for interface 9 (bypasses tag logic). Obsoletes: interface9-sg
  • interface10_sg β€” Security Groups to restore for interface 10 (bypasses tag logic). Obsoletes: interface10-sg
  • interface11_sg β€” Security Groups to restore for interface 11 (bypasses tag logic). Obsoletes: interface11-sg
  • interface12_sg β€” Security Groups to restore for interface 12 (bypasses tag logic). Obsoletes: interface12-sg
  • interface13_sg β€” Security Groups to restore for interface 13 (bypasses tag logic). Obsoletes: interface13-sg
  • interface14_sg β€” Security Groups to restore for interface 14 (bypasses tag logic). Obsoletes: interface14-sg
  • interface15_sg β€” Security Groups to restore for interface 15 (bypasses tag logic). Obsoletes: interface15-sg

and now the general / logging / timing girlies ✨

  • quiet β€” Disable logging to stderr. Heads up: it does not affect --verbose, --debug-file, or logging to syslog. 🀫
  • verbose β€” Verbose mode. You can stack multiple -v flags on the command line (like -vvv) to crank the verbosity up. πŸ“’
  • 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 the plug parameter when you're specifying more than 1 plug. Default value: ,
  • separator β€” Separator for the CSV created by the 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 the cmd prompt after login. Default value: 5
  • power_timeout β€” Test X seconds for a 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 the cmd prompt after issuing a 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 πŸ”

and that's the whole page bestie, you made it to the end πŸŽ€

this lil beauty is fence_aws_vpc_net, a Fence Agent, dated 2009-10-20, and it lives in section FENCE_AGENT(8) of the manual. go forth and fence responsibly, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from