FENCE_AGENT(8)
π 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 forlist-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 tostderr. does not affect--verbose, or--debug-file, or logging to syslog. π-v,--verboseβ verbose mode. you can stack multiple-vflags 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--verboseflags you put on the command line, or to1ifverbose=1in a stonith device configuration (i.e., onstdin).-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 thelistoperation. (Default Value:,)--delay=[seconds]β wait X seconds before fencing is started. (Default Value:0)--disable-timeout=[true/false]β disable timeout (true/false). (default:truewhen 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. returnsN/Aotherwise.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-removalunfence_ignore_restoreβ Remove all security groups except specified.. Obsoletes:unfence-ignore-restorefilterβ Filter forlist-action.boto3_debugβ Boto Lib debug. Default value:Falseπonfence_poweroffβ Power off the machine async.. Obsoletes:onfence-poweroffignore_tag_write_failureβ Continue to fence even if the backup tag fails.. Obsoletes:ignore-tag-write-failureignore_instance_stateβ Fence regardless of AWS state. Obsoletes:ignore-instance-stateinterface0_sgβ Security Groups to restore for interface 0 (bypasses tag logic). Obsoletes:interface0-sginterface1_sgβ Security Groups to restore for interface 1 (bypasses tag logic). Obsoletes:interface1-sginterface2_sgβ Security Groups to restore for interface 2 (bypasses tag logic). Obsoletes:interface2-sginterface3_sgβ Security Groups to restore for interface 3 (bypasses tag logic). Obsoletes:interface3-sginterface4_sgβ Security Groups to restore for interface 4 (bypasses tag logic). Obsoletes:interface4-sginterface5_sgβ Security Groups to restore for interface 5 (bypasses tag logic). Obsoletes:interface5-sginterface6_sgβ Security Groups to restore for interface 6 (bypasses tag logic). Obsoletes:interface6-sginterface7_sgβ Security Groups to restore for interface 7 (bypasses tag logic). Obsoletes:interface7-sginterface8_sgβ Security Groups to restore for interface 8 (bypasses tag logic). Obsoletes:interface8-sginterface9_sgβ Security Groups to restore for interface 9 (bypasses tag logic). Obsoletes:interface9-sginterface10_sgβ Security Groups to restore for interface 10 (bypasses tag logic). Obsoletes:interface10-sginterface11_sgβ Security Groups to restore for interface 11 (bypasses tag logic). Obsoletes:interface11-sginterface12_sgβ Security Groups to restore for interface 12 (bypasses tag logic). Obsoletes:interface12-sginterface13_sgβ Security Groups to restore for interface 13 (bypasses tag logic). Obsoletes:interface13-sginterface14_sgβ Security Groups to restore for interface 14 (bypasses tag logic). Obsoletes:interface14-sginterface15_sgβ Security Groups to restore for interface 15 (bypasses tag logic). Obsoletes:interface15-sg
and now the general / logging / timing girlies β¨
quietβ Disable logging tostderr. Heads up: it does not affect--verbose,--debug-file, or logging to syslog. π€«verboseβ Verbose mode. You can stack multiple-vflags on the command line (like-vvv) to crank the verbosity up. π’verbose_levelβ Level of debugging detail in output. Defaults to the number of--verboseflags specified on the command line, or to1ifverbose=1in 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 theplugparameter when you're specifying more than 1 plug. Default value:,separatorβ Separator for the CSV created by thelistoperation. Default value:,delayβ Wait X seconds before fencing is started. Default value:0β³disable_timeoutβ Disable timeout (true/false). Default:truewhen run from Pacemaker 2.0+login_timeoutβ Wait X seconds for the cmd prompt after login. Default value:5power_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:0shell_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
- fedora 43: fence-agents-aws-vpc-net 4.17.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: fence-agents-aws-vpc-net 4.17.0-2.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- ubuntu resolute: fence-agents-aws-vpc-net 4.17.0-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: fence-agents-aws-vpc-net 4.17.0-1ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms