When users enter configuration mode, the following message is seen: 'The configuration has been changed but not committed' . However, when the 'show| compare' command is run, the output reveals that no changes were made.
'The configuration has been changed but not committed'
'show| compare'
The following message is seen:
user@R1> configure Entering configuration mode The configuration has been changed but not committed [edit] user@R1# show | compare [edit] user@R1#
This output seems contradictory because it says that there are changes, but the comparison shows that there are no changes. This can be due to several reasons. One sequence of events that can lead to this is when a user makes a change and then manually reverts it. For example:
user@R1> configure Entering configuration mode user@R1# set interfaces lo0 unit 0 description test [edit] user@R1# delete interfaces lo0 unit 0 description [edit] user@R1# show | compare [edit] user@R1# [edit] user@R1# exit The configuration has been changed but not committed Exit with uncommitted changes? [yes,no] (yes) yes Exiting configuration mode user@R1> configure Entering configuration mode The configuration has been changed but not committed [edit] user@R1# show | compare
In this case, the software knows that a change has been made. Two changes were made in this case: addition of a description to the loopback interface and then removal of the description from the loopback interface. This is the reason that the software shows that a change has been made. In this case, these changes cancel each other out, resulting in no net change to the configuration. That is why the " show | compare" output shows no changes.
show | compare"
The solution is to roll back the configuration. This action will cause the software to delete the current shared candidate configuration database and make a new one from a copy of the current committed configuration. This lets the software know that no changes have been made:
user@R1> configure Entering configuration mode The configuration has been changed but not committed [edit] user@R1# show | compare [edit] user@R1# rollback load complete [edit] user@R1# exit Exiting configuration mode user@R1> configure Entering configuration mode
Now the CLI no longer warns that the configuration has been changed.
2021-08-10: Redundant show | compare output removed; other minor changes made