cancel-commit (WORD|)
When a <cancel-commit> operation is performed before timer expiry of a time based commit, the committed configuration will be reverted immediately.
When <cancel-commit> is performed in the same session as <commit confirmed>, a commit-id is not required, and configurations can be canceled without providing the commit-id. However, if <cancel-commit> is performed from a different session, a valid commit-id must be provided to cancel the ongoing <commit confirmed> operation.
The <cancel-commit commit-id> is supported starting from OcNOS version 6.6.0. The <cancel-commit commit-id> command can be executed from different sessions as well.
Command Syntax
cancel-commit (WORD|)
Parameters
WORD
(Optional) The commit-id of the commit confirmed operation.
Default
None
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 6.3.0 and updated in OcNOS version 6.6.0.
Example
The following example shows commit configuration changes before the timeout in a “confirmed commit” operation:
(config)#router ospf 1
(config-router)#router ospf 2
(config-router)#commit confirmed timeout 100 description This is a test for confirmed commit
(config-router)#confirm-commit
The following example shows the cancel commit configuration changes before the timer expires in a time-based commit within the same session:
(config)#
(config)#router ospf 1
(config-router)#router ospf 2
(config-router)#commit confirmed timeout 100 description This is Test for confirmed commit
(config-router)#cancel-commit
The following example shows the cancel commit configuration changes before the timer expires in a time-based commit in a different session:
Session 1
------------------------
#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)#ospf router-id 5.5.5.5
(config-router)#commit confirmed timeout 150
(config-router)#end
#show commit list
S.No. ID User Client TimeStamp Commit Status Description
~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
1 1710233397092066 root cmlsh 12-03-2024 08:49:57 Remaining Time: 148 NA
#show run router ospf
!
router ospf 5
ospf router-id 5.5.5.5
!
Session 2
#show commit list
S.No. ID User Client TimeStamp Commit Status Description
~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
1 1710233397092066 root cmlsh 12-03-2024 08:49:57 Remaining Time: 24 NA
#show run router ospf
!
router ospf 5
ospf router-id 5.5.5.5
!
#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
(config)#cancel-commit
%% Error: no pending commit in this session. To cancel-commit of another session, please provide a commit-id
(config)#confirm-commit
%% Error: no pending commit in this session. To confirm-commit of another session, please provide a commit-id
(config)#cancel-commit 1710233397092066
(config)#
(config)#end
#show commit list
S.No. ID User Client TimeStamp Commit Status Description
~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
#show run router ospf
!
#