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]
host_name
#
save configuration /flash/config.cfg
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]
host_name
#
save configuration /flash/config.cfg
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]
host_name
#
save configuration /flash/config.cfg ignore-locks
Warning: Ignoring the configuration mode lock held by another administrator
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 84
.
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 C to exit
the wait as shown in the example below.
[local]
host_name
#
reload
Are you sure? [Yes|No]:
yes
Waiting for other administrators to finish saving configuration
(ctrl-c to abort) .......
^C
Action aborted by ctrl-c
[local]
host_name
#
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]
host_name
#
reload ignore-locks -noconfirm
Warning: One or more other administrators are saving configuration
Starting software 21.0...
ASR 5000 System Administration Guide, StarOS Release 21.1
84
Config Mode Lock Mechanisms
Saving a Configuration File
Summary of Contents for ASR 5000
Page 26: ...ASR 5000 System Administration Guide StarOS Release 21 1 xxvi Contents ...
Page 316: ...ASR 5000 System Administration Guide StarOS Release 21 1 288 VLANs VLAN Related CLI Commands ...
Page 400: ...ASR 5000 System Administration Guide StarOS Release 21 1 372 Engineering Rules ECMP Groups ...