Saving a Configuration File
Saving a Configuration File
Saving a partial or incomplete configuration file can cause StarOS to become unstable when the saved
configuration is loaded at a later time. StarOS inhibits the user from saving a configuration which is in the
process of being modified.
With a shared-lock in-effect for the duration of the save operation, you are prompted to confirm the save
operation.
[local]
Warning: One or more other administrators may be configuring this system
Are you sure? [Y/N]:
If an exclusive-lock is being held by a user, the save operation will fail.
[local]
Failure: Configuration mode is currently locked, use ignore-lock to ignore lock
You can use the ignore-locks keyword with the save configuration command to override an existing
exclusive-lock.
[local]
Warning: Ignoring the configuration mode lock held by another administrator
Important
Reload and Shutdown Commands
The Exec mode reload and shutdown commands can result in a corrupted or partial configuration file when
either of these commands are executed while a save configuration command is still in progress.
To prevent this problem from occurring, the reload and shutdown commands share a CLI shutdown-lock
with all save configuration commands executed across StarOS. This means while any save configuration
command is executing, StarOS cannot execute a reload or shutdown command. These commands are queued
indefinitely until all save configuration operations are complete.
To prevent the user from being "hung" indefinitely in the wait queue, the user may press Control+C to exit
the wait as shown in the example below.
[local]
Are you sure? [Yes|No]:
Waiting for other administrators to finish saving configuration
(ctrl-c to abort) .......
Action aborted by ctrl-c
[local]
On those rare occasions when you must reboot StarOS immediately regardless of the risk of corrupting any
file(s) in the process of being saved, you can use the ignore-locks keyword in combination with the reload
or shutdown command. With this option StarOS displays the appropriate warning message, but does not wait
for save configuration operations to complete before initiating the reboot.
[local]
Warning: One or more other administrators are saving configuration
Starting software 21.0...
ASR 5500 System Administration Guide, StarOS Release 21.5
54
host_name
save configuration /flash/config.cfg
#
host_name
save configuration /flash/config.cfg
#
host_name
save configuration /flash/config.cfg ignore-locks
#
The save configuration command also enables a shutdown-lock that prevents any other users from
reloading or shutting down the system while the configuration is being saved. For additional information,
refer to
Reload and Shutdown Commands, on page
host_name
reload
#
yes
^C
host_name
#
host_name
reload ignore-locks -noconfirm
#
Config Mode Lock Mechanisms
54.