| TPVM Upgrade State | Next State | Case | Description | 
|---|---|---|---|
| TPVM Upgrade Workflow Started | Device Validation | -Normal Upgrade -Node Replacement | Initial start state for the TPVM upgrade workflow. | 
| Device Validation | Success: TPVM Config Validation Failure: TPVM Upgrade Workflow Finished | -Normal Upgrade -Node Replacement | Ensure that the provided device IP has associated TPVM configurations persisted in the EFA DB, and the device‘s TPVM IP is one of the EFA peer node IPs. | 
| TPVM Config Validation | -Normal Upgrade: Success: TPVM Upgrade Failure: TPVM Upgrade Workflow Finished -Node Replacement: Success: TPVM Configuration Failure: TPVM Upgrade Workflow Finished | -Normal Upgrade -Node Replacement | Read TPVM config and operational data from the device and determine if it is a normal TPVM Upgrade or a Node Replacement case. 
 The detailed status column from the tpvm-upgrade show command output shows the nature of the issue and possible remedy. | 
| TPVM Configuration | Success: TPVM Installation Failure: TPVM Upgrade Workflow Finished | -Node Replacement | Device‘s running-config is programmed using TPVM config data from EFA DB. | 
| TPVM Installation | Success: EFA Deploy Peer and Rejoin Failure: TPVM Upgrade Workflow Finished | -Node Replacement | TPVM install and start is invoked on the device. | 
| TPVM Upgrade | Success: EFA Deploy Peer and Rejoin Failure: TPVM Revert | -Normal Upgrade | TPVM upgrade is invoked on the device. | 
| TPVM Revert | Success: TPVM Upgrade Workflow Finished Failure: TPVM Upgrade Workflow Finished | -Normal Upgrade | On failure of “Upgrading TPVM” or “Deploying EFA for Rejoin”, the TPVM revert is invoked to roll-back the failed TPVM upgrade. | 
| EFA Deploy Peer and Rejoin | Success: TPVM Upgrade Workflow Finished Failure: TPVM Revert | -Normal Upgrade -Node Replacement | On active EFA node, re-deploying of EFA on the peer node for rejoin is invoked. | 
| TPVM Upgrade Workflow Finished | N/A | -Normal Upgrade -Node Replacement | End state for the TPVM upgrade workflow. |