[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Using the configure private Command

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

Note: You cannot enter configure private mode when the global configuration has been modified.

When you commit a private candidate configuration, the JUNOS 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 made in the private candidate configuration are merged into the most recently committed global configuration, are activated, and begin running on the router, and 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 in configure private mode can issue the rollback or update command to obtain the most recently committed shared configuration. For more information about the update command, see Updating the Configure Private Configuration.

You must issue the commit command from the top of the configuration.

You cannot save a configure private session; uncommitted changes are discarded.

You cannot issue the commit confirmed command when you are in configure private mode.

Following an upgrade or downgrade of JUNOS software, you must use normal configuration mode or configure exclusive mode to commit a configuration before you can use the configure private command.

If a configure private edit is in session, other users who issue the configure command can only view the global configuration; a message appears indicating that these users must use the configure exclusive or configure private commands to modify the configuration:

[edit]
user@host# set system host-name ipswitch
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 2002-02-21 14:18:46 PST
[edit]
user@host#

Note: Users in configure private or configure exclusive mode cannot exit the global configuration with uncommitted changes.

If another user commits a change to the same section of the configuration that the private user has modified, a merge conflict may result. In this case, the JUNOS 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 foo
[edit]
user@host# show | compare
[edit system]
- host-name host;
+ host-name foo;
[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 foo;
[edit]
user@host#

In this example, after the JUNOS 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 you are 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 in. For example:

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

Note: Merge conflicts can occur when you issue the update command.

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

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

 


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]