Stage and Activate Junos OS Evolved Software
You can install software using separate stage and activate phases.
Starting in Release 25.4R1, Junos OS Evolved optimizes the software installation process by providing separate staging and activation phases on devices that support this feature. This segmentation enables you to stage software images without immediately designating them for the next boot, offering greater operational flexibility and system reliability. You can later activate an installed software version at any time. By utilizing distinct phases for the installation tasks, you can more effectively manage and validate software images.
Benefits of Separate Stage and Activate Phases for Software Installations
-
Enhance operational flexibility by staging software images without immediate activation, facilitating controlled upgrade processes.
-
Facilitate validation and configuration checks prior to activation.
-
Shorten maintenance windows for software upgrades by performing staging and validation tasks in advance.
Understanding the Stage and Activate Options
You have the option to install software in separate staging and activation phases. This segmentation provides finer control over software management, enabling you to pre-stage and validate software images without activating them for the next boot cycle. You can stage a new software package, enabling additional testing and validation of the configuration before activation. You can also stage an existing software version, which validates the active configuration against the installed software. If the validation is successful, the system copies the validated configuration to the /data directory associated with that software version.
After you stage a software image, you can activate it at any time. The activation mechanism sets the software version with its corresponding configuration as the next boot version. You can optionally reboot the system when you activate the software.
By separating the installation tasks, you can pre-stage multiple images and make thorough validation checks, ensuring all system components are compatible with the new software version before activating it. Furthermore, by staging and validating software images in advance, you can shorten the maintenance window for software upgrades, which is reduced to activating the image and rebooting the system. This approach fosters smoother transitions and minimizes potential disruptions in network operations, maintaining high system availability.
Before you Begin
Before you install a new software release on a device and activate it, you should back up the current system and prepare the system for the installation. For more information, see Install, Upgrade, and Downgrade Software.
Stage a New Software Version
You can stage one or more new versions of software without setting them as the next boot version. When you stage the software, the system installs the software and adds it to the list of software images. This operation does not modify the currently running software stack. During the staging process, the system validates the current configuration using the new version of the software. Once validation succeeds, the install process checks for sufficient storage on any Routing Engine nodes. Once the storage checks pass, the system installs the new software in a read-only location in the file system.
To stage a new software version:
The system installs the image but does not set it as the next boot version.
Activate a Software Version
After you stage a software version, you can activate it at any time. Activating a software version sets it as the next boot version. You can activate any installed version except the current version. You can only activate a software version with the configuration corresponding to that version.
To activate an installed software version:
After the device reboots, all nodes should be running the new software version.
If you try to activate a software version that is not installed on the device or
if you enter an invalid software version name, the system generates an error, as
shown in the following output. Use the show system software
list to verify the installed software versions that you can
activate.
user@host-re0> request system software activate with-old-snapshot-config junos-evo-install-ptx-x86-64-25.4R1.10-EVO Download and Validate in Progress re0: Error: This version junos-evo-install-ptx-x86-64-25.4R1.10-EVO is not found on RE ERROR: This version is not found on RE. Node:re0 Image: re0:junos-evo-install-ptx-x86-64-25.4R1.10-EVO Validation and download failed. Aborting upgrade.
Similarly, if you try to activate the current software version, the system generates an error.
user@host-re0> request system software activate with-old-snapshot-config junos-evo-install-ptx-x86-64-25.4R1.8-EVO Download and Validate in Progress re0: Error: Cannot activate current version ERROR: Cannot activate current version. Node:re0 Image: re0:junos-evo-install-ptx-x86-64-25.4R1.8-EVO Validation and download failed. Aborting upgrade.
Validate the Active Configuration Against a Software Version
You can validate the active configuration against any installed software version and then save the validated configuration as the configuration for that software version. Then when you activate the software version, it uses the saved configuration. If you validate the configuration against an activated software version, the system deactivates the version before validating the configuration. Deactivation removes the next boot pointer for that version. After validation, you must activate the software version again to set the next boot pointer for that image.
To validate and save the active configuration for a given software version:
When you stage the software version, the system validates the active configuration against the software. If the validation is successful, the system copies the active configuration to the staging directory for that software. If you later activate the software, it uses the newly saved configuration.
If you run the request system software stage command and the
software version's configuration is identical to the active configuration, the
output indicates that there are no configuration differences.
user@host-re0> request system software stage junos-evo-install-ptx-x86-64-25.4R1.8-EVO Software staging in progress... re0: No config change is done since last staging. re0: Skipping current config validation for staged software version. re0: Skipping current config copy to staged version. re0: Stage is Done. re0: Syncing nodes re0: All nodes synced