Knowledge Search


×
 

[Junos] Example - Clear a pending commit

  [KB8708] Show Article Properties


Summary:

This article provides an example of how to clear a pending commit.

Symptoms:

A user wants to edit the configuration and commit applied changes in the configuration, but the system rejects the changes as well as the commit due to a pending commit ('commit at' command).  The following message is displayed:

[edit]
user# commit
error: Another commit is pending


 

Solution:

If you need to make any changes before the scheduled commit, you can use the command clear system commit.


The example below shows how a commit can cause problems and how to clear any pending commits:

  • A user makes some configuration changes and issues a 'commit at' for a certain date:

      user> configure
      Entering configuration mode

      [edit]
      user# show system login message
      message " \n\n ********** test ********** \n\n";

      [edit]
      user# commit at "2006-12-31 23:59:59"
      configuration check succeeds
      commit at will be executed at 2006-12-31 23:59:59 CET
      The configuration has been changed but not committed
      Exiting configuration mode

     
  • Before the commit has taken place, the configuration needs to be further changed. This fails due to the pending commit:

      user> configure
      Entering configuration mode
      Users currently editing the configuration:
      user terminal d0 (pid 15099) on since 2006-07-27 09:23:28 CEST
      commit-at
      The configuration has been changed but not committed

      [edit]
      user# set firewall family inet filter urgent term 1 then accept
      error: configuration database locked by:
      user terminal d0 (pid 15099) on since 2006-07-27 09:23:28 CEST, idle 00:00:38
      commit at
      error: configuration database locked by:
      user terminal d0 (pid 15099) on since 2006-07-27 09:23:28 CEST, idle 00:00:38
      commit at

      [edit]
      user# commit
      error: Another commit is pending

     
  • With the clear system commit command the pending commit can be cleared and the configuration changes can be committed:

      [edit]
      user# run clear system commit
      Pending commit cleared

      [edit]
      user# set firewall family inet filter urgent term 1 then accept

      [edit]
      user# set interfaces lo0 unit 0 family inet filter input urgent

      [edit]
      user# commit
      commit complete

     
Modification History:
2019-07-06: Minor, non-technical edits.
Related Links: