Using the Fabric Transaction Commands
You can roll back the fabric to a specific fabric transaction number. If a failure occurs on the fabric, transactions on nodes in the fabric can go out of sync. Once transactions are out of sync, no further transactions can be executed across the scope of local, fabric, or cluster. Unjoining and rejoining the fabric causes the node to lose its configuration.
As part of a single node transaction recovery, you can roll back the transaction number to a previous one. If multiple nodes are out of sync, you must recover each node separately.
You can also roll the fabric transaction ID forward on a node if it is out of sync with the rest of the fabric.
As an example, a switch, CBF-Switch2, is out of sync with the rest of the fabric. The fabric transaction ID is 327 and the rest of the nodes have a transaction ID of 328. In this case, you can roll the node, CBF-Switch2, forward to transaction ID 328. Enter the following command on node CBF-Switch2:
CLI network-admin@Leaf1>transaction-rollforward-to scope fabric tid 328
This command produces output when an error occurs during the transaction. If there is no output, the transaction is successful.
To display transaction information for CBF-Switch2, use the transaction-show command:
CLI network-admin@Leaf1>transaction-show format all layout vertical
command: --unrecoverable-- vlan-delete id 22
undo-command: --unrecoverable-- vlan-create id 22 nvid a000030:16 scope fabric name vlan-22 active yes stats vrg 0:0 ports 1-72,128-129,255 untagged-ports none send-ports 31,41,47-48,51,65-66 active-edge-ports none ports-specified false flags
command: vlan-create id 35 scope fabric stats ports-specified true
The scope parameter indicates which set of transactions to display as each scope has an independent set of transactions associated with it. The default scope is fabric unless another scope is specified.
You cannot copy and paste commands and undo-commands because they include information that cannot apply to new commands. These fields are informational-only and allow you to see exactly what happens to the configuration when you roll forward or roll back the transaction ID.
Once you decide which node you want to modify and the transaction that you want to roll forward or roll back, you use the transaction-rollforward-to or transaction-rollback-to commands to re-run the command (roll forward) or undo the command (rollback) on the node.
This applies only to the local node.
More Information About Undo Commands and Transactions
You may see output similar to this output:
command: port-config-modify port 9 enable
undo-command: port-config-modify port 9 enable
This output is actually correct. The undo info is taken from the current state on the fabric. So if the port is currently enabled, and you try to enable it again, you see the undo-command in the output, since the previous state is also enabled. If you actually disable the port first, and then enable it, you see the expected undo info in the transaction log.
command: port-config-modify port 12 disable
undo-command: port-config-modify port 12 enable
command: port-config-modify port 12 enable
undo-command: port-config-modify port 12 disable
So undo is not necessarily the opposite of the current command, but allows you to go back to the state before the command was issued. This may be the exact same state as before.