commit-rollback

Use this command to revert configurations to a previously committed stable state. This action will remove configurations made after the provided commit ID (Word).

The <commit confirmed> command applies the configuration on a trial basis for the time period specified in seconds. If the configuration is not confirmed by the user within this time, an auto roll-back will be triggered once the timer expires.

After the configurations are confirmed, if the user wishes to revert to either the normal commit operation or the confirmed commit operation, the commit rollback feature can be used.

To use commit-rollback, cml commit-history must be enabled.

Command Syntax

Copy
commit-rollback to WORD (description LINE|)

Parameters

WORD

Commit ID associated with recorded commit operations stored within the commit- history list.

description LINE

[Optional] Short description about commit-rollback, maximum 64 valid characters.

Command Mode

Execution mode

Applicability

This command is introduced in OcNOS version 6.4.1.

Example

Example output for commit-rollback WORD:

Copy
#show commit list
 
S.No.         ID           User    Client         TimeStamp               Commit Status                     Description
~~~~~  ~~~~~~~~~~~~~~~~~   ~~~~~   ~~~~~~   ~~~~~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~         ~~~~~~~~~~~~~~~~~~~~~~~~~
  1    1684542445002144   ocnos    cmlsh    20-05-2023 00:27:25             Confirmed                            NA

Example of a Commit Rollback to the Commit List ID 1684542445002144:

Copy
#commit-rollback to 1684542445002144 description commit-rollback Test
#show commit list
 
S.No.         ID           User    Client         TimeStamp               Commit Status                      Description
~~~~~  ~~~~~~~~~~~~~~~~~   ~~~~~   ~~~~~~   ~~~~~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         ~~~~~~~~~~~~~~~~~~~~~~~~~
  1    1684542445002144   ocnos    cmlsh    20-05-2023 00:27:25            Confirmed                             NA
  2    1684542402123428   ocnos    cmlsh    20-05-2023 00:28:45     Rollback to 20-05-2023 00:27:25         commit-rollback Test

Example of an automatic Commit Rollback

Copy
#show commit list
 
S.No.         ID           User    Client         TimeStamp               Commit Status                    Description
~~~~~  ~~~~~~~~~~~~~~~~~   ~~~~~   ~~~~~~   ~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
#show run router ospf
!
#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
(config)#router ospf 5
(config-router)#router ospf 6
(config-router)#commit confirmed timeout 20 description This is to test auto rollback of config
(config-router)#end
#show commit list
 
S.No.         ID           User    Client         TimeStamp               Commit Status                    Description
~~~~~  ~~~~~~~~~~~~~~~~~   ~~~~~   ~~~~~~   ~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
  1    1698242643599569    root    cmlsh    25-10-2023 14:04:03           Remaining Time: 17            This is to test auto rollback of config
 
#show run router ospf
!
router ospf 5
!
router ospf 6
!
#
Warning!!! Confirmed-commit timed out for commitid: 1698242643599569
#show commit list
 
S.No.         ID           User    Client         TimeStamp               Commit Status                    Description
~~~~~  ~~~~~~~~~~~~~~~~~   ~~~~~   ~~~~~~   ~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
  1    1698242643599569    root    cmlsh    25-10-2023 14:04:03           Timed-out (Reverted)         This is to test auto rollback of config
 
#show run router ospf
!
#