Displaying the Transaction History 

When configuring and administering the fabric, you can display the list of executed transactions by using the transaction-show command. For example in this case committed transaction 1 corresponds to a command in which a vRouter was created:

CLI (network-admin@switch) > transaction-show 

start-time:    2020-05-14,15:38:34.622

tid:           1

state:         commit

command:       vrouter-create id b001b66:0 name vr1 scope fabric vnet test-fab-2-global dedicated-vnet-service locati

on 1 storage-pool rpool zone-id b001b66:1 router-type hardware router-ipstack frr hw-router-mac 66:0e:94:66:b3:0f clu

ster-active-active-routing hw-vrid 0 hw-vrrp-id -1 bgp-redist-static-metric none bgp-redist-connected-metric none bgp

-redist-rip-metric none bgp-redist-ospf-metric none bgp-max-paths 1 bgp-delayed-startup 1 bgp-update-delay-strict 0 b

gp-keepalive-interval 60 bgp-holdtime 180 bgp-global-nh-preference true ospf-redist-static-metric none ospf-redist-st

atic-metric-type 2 ospf-redist-connected-metric none ospf-redist-connected-metric-type 2 ospf-redist-rip-metric none 

ospf-redist-rip-metric-type 2 ospf-redist-bgp-metric none ospf-redist-bgp-metric-type 2 ospf-default-information none

 ospf-default-info-originate-metric none ospf-default-info-originate-metric-type 2

undo-command:  vrouter-delete name vr1


start-time:    2020-05-14,15:39:02.820

tid:           2

state:         commit

command:       vrouter-interface-add vrouter-name vr1 nic eth0.4092 ip netmask 24 mac 66:0e:94:66:b3:0f vl

an 4092 vlan-type public public-vlan 4092 no-exclusive nic-enable no-pim pim-dr-priority 1 no-pim-cluster no-fabric-n

ic vrrp-priority 100 vrrp-adv-int 1000 l3-port 45 mtu 1500 no-sriov-vf mirror-traffic false no-priority-tag

undo-command:  vrouter-interface-remove vrouter-name vr1 nic eth0.4092

The NetVisor OS transaction log file contains the list of commands corresponding to the executed transactions as well as the undo command(s) required to undo each transaction. Commands are shown in the transaction-show output for informational purposes only.

Each transaction can have a local, cluster or fabric scope. For example acceptance of the EULA is a transaction that is local to each device:

CLI (network-admin@switch) > transaction-show transaction-scope local

start-time:    2019-06-02,21:50:35.497

tid:           1

state:         commit

command:       switch-setup-modify eula-accepted true eula_timestamp 2019-06-02,21:50:35

undo-command:  switch-setup-modify eula-accepted false eula_timestamp 1969-12-31,16:00:00

On the other hand, for instance transactions of VLAN creation and deletion are usually (but not necessarily always) executed with a fabric scope. Other objects such as vNETs are created and deleted with a fabric scope too, as shown in the example below:

CLI (network-admin@switch) > transaction-show transaction-scope fabric

start-time:    2019-06-02,22:10:54.895

tid:           1

state:         remote-commit

command:       vlan-create id 100 type public vxlan-mode standard scope fabric stats

undo-command:  vlan-delete id 100


start-time:    2019-06-02,22:11:25.834

tid:           2

state:         remote-commit

command:       vnet-create id c00025b:1 name vn1 scope fabric vrg c00025b:0 vlan-type public vlans 5 config-admin create-vnet-mgr vnet-mgr-storage-pool rpool vnet_mgr_id c00025b:0 vnet_mgr_zone_id c00025b:1 vnet_mgr_location 1 vrg_created_by_vnet true admin_role c00025b:400

undo-command:  vnet-delete name vn1


start-time:    2019-06-02,22:11:36.907

tid:           3

state:         remote-commit

command:       vlan-delete id 100

undo-command:  vlan-create id 100 type public hw-vpn 0 hw-mcast-group 0 replicators "" repl-vtep :: in_hw false public-vlan 100 user_public_id 0 public_id_set_by_user false scope fabric description vlan-100 label "vlan 100" active yes stats uses_refcnt no refcnt 0 vrg 0:0 ports 1-69 untagged-ports none send-ports 21,23,31-34,53,57,61,65,69,272-275 active-edge-ports 272 non-auto-ports none ports-specified false initialized true flags ""


start-time:    2019-06-02,22:11:51.550

tid:           4

state:         remote-commit

command:       vnet-delete name vn1

undo-command:  vnet-create id c00025b:1 name vn1 scope fabric vrg c00025b:0 vlan-type public vlans 5 config-admin admin 40000 create-vnet-mgr vnet-mgr-name vn1-mgr vnet-mgr-storage-pool rpool vnet_mgr_id c00025b:0 vnet_mgr_zone_id c00025b:1 vnet_mgr_location 1 vrg_created_by_vnet true global false allow_admin_access false admin_role c00025b:400

In case of clusters (that is, pairs of redundant devices described in more detail later in this guide) certain transactions are applied to both nodes as if they were a single logical device.

You can choose the transaction information format for a node by typing the transaction-show command followed by the format parameter to choose a tabular or a vertical output. For example:

CLI (network-admin@switch) > transaction-show format all layout vertical 

start-time:   03-19,13:46:42

end-time:     03-19,13:46:43

scope:                fabric

tid:                        33

state:                remote-commit

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 


start-time:   09:36:09

end-time:     09:36:09

scope:                 fabric

tid:                 34

state:                remote-commit

command:                vlan-create id 35 scope fabric stats ports-specified true

Please note that, in this command’s output, the scope parameter indicates which set of transactions are displayed, as each scope has an independent set of transactions associated with it. As shown in this example, NetVisor OS uses fabric as the default scope unless another scope is specified. 

Also note that you should not copy and paste commands and undo-commands from this output because they may include information that does not apply to a different context. As a matter of fact, as mentioned earlier, NetVisor OS displays the fields for informational purposes only so as to 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 to modify and the transaction to roll forward or roll back to, you can use the transaction-rollforward-to or transaction-rollback-to commands to re-run the command (roll forward) or undo the command (roll back) on the node being troubleshooted, or even in a broader scope, as described in the following sections.