To validate configurations after they are complete, configure the two-phase validation mode.
The two-phase validation mode enhances configuration security and reliability and minimizes the impact of configurations on services. If the configuration of a service that has taken effect does not meet your expectation, roll the system back to the status before the configuration is committed.
Configurations are locked in the user view.
To use the running database exclusively, lock configurations on the router.
After locking configurations, you can edit and commit configurations. Other users can view and edit configurations but cannot commit configurations.
Other users can configure services in the running database only after you unlock configurations.
The two-phase validation mode is configured.
In two-phase validation mode, the command prompt is as follows:
<HUAWEI> system-view [~HUAWEI]
Configurations in the candidate database are previewed, including uncommitted and committed ones.
You can run the clear configuration candidate command to delete all uncommitted configurations.
The trial running of a system configuration is enabled.
The configuration is committed.
To prevent a service from being affected, you can lock the configuration of the service as soon as the service process is initiated. When the configuration is being locked, configurations cannot be committed. The configuration of the service remains locked until the service process successfully starts. During this period, the configuration cannot be committed but can be viewed.
If the configuration fails to be committed, wait 30 seconds and commit the configuration again. If the configuration fails to be committed again, a user has locked the configuration.
After locking the configuration, you must unlock it after completing the configuration. Otherwise, configurations of other users cannot take effect.