TNAP; The Node Assassin Protocol is the protocol that defines how commands are to be passed to a Node Assassin device and what output to expect in return. Generally, you will use telnet to connect to a Node Assassin.
There are two types of calls:
Any message starting with 00:x are query commands. That is, the integer represented by x is interpreted to be a specific information request. Currently, two queries are supported:
All queries and commands terminate with a final EOM on a new line. Any programs accessing a Node Assassin must watch for this message and, not finding it, treat any messages as incomplete and corrupt.
00:0 - Node Status
To request the state of all supported nodes, send:
This will generate a message such as:
Node states: - Node Count: 04 - Node 01: P0 R0 F1 - Node 02: P0 R0 F1 - Node 03: P1 R1 F0 - Node 04: P0 R0 F0 End Message.
The status is broken down into three values:
- Power: P[0|1]
- Reset: R[0|1]
- Feed: F[0|1].
For the power and reset buttons, a value of 0 indicates that the related switch switch is open. If it is set to 1, the switch is closed (the indicated button is "pressed").
For the Feed value, 0 indicates that there is no power coming from the node's feed and thus, the node is "off" or disconnected. If the feed is 1, then power is detected from the node and the node is known to be "on".
Quick reference table:
|Power Feed||F||Node is On||Node is Off/disconnected|
00:1 - NA Information
This query requests information on the node assassin device itself and is called via:
This will generate a message such as:
Node info: - Node Name: ..... Motoko - Port Count: .... 04 - NAOS Version: .. v18.104.22.168 - Serial Number: . PR0002 - Build Date: .... 2010-04-03 - MAC address: ... 02:00:00:FF:F0:AA - IP address: .... 192.168.1.66 - Subnet Mask: ... 255.255.255.0 - Default Gateway: 192.168.1.1 EOM
The above information is from the internal NAOS, not from the configuration file.
Commands are always given in the form: XX:Y where:
- XX is the two-digit, zero-padded node number between 01 and max node.
- Y is the single-digit command being issues.
XX:0 - Release
Release the fence on the node if one exists. Specifically, both power and reset switches are opened.
XX:1 - Fence
Fence the specified node. Specifically;
- The state is checked.
- If the node is already fenced, the fence is momentarily released so that it can be re-applied.
- The reset switch is closed for one second to immediately disable the node.
- The reset switch is opened for one second.
- Some machines will not respond to the power button if the reset button is simultaneously pressed.
- The power switch is closed.
- After five seconds the node's power feed is checked. If the feed is still high, NA waits another 25 seconds and checks again. If the feed is still high, an error is generated.
- The reset switch is closed.
- At this point, both power and reset are closed, disabling the node's front-panel switches preventing accidental booting of the node before the fence is released.
XX:2 - Boot or Graceful Power Off
This will close the power switch for one second and then re-open it. If the node was off, this should initiate a boot. If the node was on, this should initiate shutdown via ACPI. The power feed is checked prior to the one second fence and the returned message reflects whether the node is being booted or shut down.
XX:3 - Force Power Off
This is essentially the same as XX:1 except the node is not locked at the end of the fence process. This will close the power switch. After five seconds the node's power feed is checked. If the feed is still high, NA waits another 25 seconds and checks again. If the feed is still high, an error is generated. Regardless of success or failure, the fence is removed.
|Any questions, feedback, advice, complaints or meanderings are welcome.|
|Us: Alteeve's Niche!||Support: Mailing List||IRC: #clusterlabs on Freenode||© Alteeve's Niche! Inc. 1997-2019|
|legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.|