Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] How can multiple users edit different parts of a configuration simultaneously

0

0

Article ID: KB19653 KB Last Updated: 08 Sep 2020Version: 3.0
Summary:

This article describes how multiple users can edit different parts of a configuration simultaneously by using private configuration mode.

 

Symptoms:

The configure private command allows multiple users to edit different parts of a configuration at the same time and commit only their changes or roll back, without interfering with each other's changes. When the configure private command is used, you work in a private candidate configuration, which is a copy of the most recently committed configuration.

When you commit a private candidate configuration, the Junos OS software temporarily locks the global configuration, enforces the restriction that the global configuration must be unmodified to commit private changes, and validates the private candidate configuration. If a merge conflict occurs, the commit fails and the configuration lock is released.

You can then modify your private candidate configuration and commit it again. If there are no errors, the changes being made in the private candidate configuration are merged with the most recently committed global configuration, activated, and run on the router. Also, the configuration lock is released.

Note: You cannot commit changes in configure private mode when another user is in configure exclusive mode.

If the global configuration has changed, users who are in the configure private mode can issue the rollback or update command to obtain the most recently committed shared configuration. 

You must issue the commit command from the top of the configuration. You cannot save a configure private session; uncommitted changes are discarded. Also you cannot issue the commit confirmed command when in configure private mode.

After an upgrade or downgrade of Junos OS software, you must use the normal configuration or configure exclusive mode to commit a configuration before using the configure private command.

 

Solution:

If a configure private edit is in session, other users who have issued the configure command can view only the global configuration. A message is displayed, which indicates that these users must use the configure exclusive or configure private command to modify the configuration:

[edit]
user@host# set system host-name TEST
error: private edits in use. Try 'configure private' or 'configure
exclusive'
[edit]
user@host#  

If the global configuration has been modified, users cannot enter configure private mode, because they cannot commit changes when the global configuration has been modified. For example:

user@host# configure private
error: shared configuration database modified
Users currently editing the configuration:
root terminal d0 (pid 7951) on since 202-12-25 14:18:46 PST
[edit]
user@host#  

If another user commits a change to the same section of the configuration that a private user has modified, a merge conflict may occur. In this case, the Junos OS software updates the private user’s configuration with the most recently committed global configuration, and then allows the private user to commit the changes. For example:

[edit]
user@host# set system host-name ROCKY
[edit]
user@host# show | compare
[edit system]
- host-name host;
+ host-name ROCKY;
[edit]
user@host# commit
[edit system host-name]
'host-name bar'
statement does not match patch; 'bar' != 'host'
load complete (1 errors)
[edit]
user@host# show | compare
[edit system]
- host-name bar;
+ host-name ROCKY;
[edit]
user@host# 

In this example, after the Junos OS software detects the merge conflict and fixes it, the user in configure private mode issues the show | compare command. This command displays the private user’s database changes against the most recently committed shared configuration.

Updating the Configure Private Configuration

When in configure private mode, you must work with a copy of the most recently committed shared configuration. If the global configuration changes, you can issue the update command to update your private candidate configuration. When you do this, your private candidate configuration contains a copy of the most recently committed configuration with your private changes merged with it. For example:

[edit]
user@host# update
[edit]
user@host#  

Discarding the Private Configuration

You can also issue the rollback command to discard the private candidate configuration changes and obtain the most recently committed configuration:

[edit]
user@host# rollback
[edit]
user@host# 

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search