Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

gNOI Operating System (OS) Service

SUMMARY Use the gNOI operating system (OS) service to upgrade the software on the target network device.

You can use the gNOI OS service to upgrade software on the target device. The proto definition file is located at https://github.com/openconfig/gnoi/blob/master/os/os.proto.

Software installation has three main steps, which correspond to the OS service RPCs.

  • Install
  • Activate
  • Verify

The Install() RPC transfers the specified image to the /var/tmp/ directory on the target device. The destination filename is the value defined in the TransferRequest message's version field. The Activate() RPC installs the image and reboots the device to activate the newly installed image. The Verify() RPC validates the OS version on the device.

Note:

You can also use the gNOI system service SetPackage() RPC to install software on a device. For more information, see gNOI System Service.

Supported RPCs

Table 1: Supported os.proto RPCs
RPC Description Introduced in Release
Activate()

Set the OS version that is used at the next reboot.

Activate() reboots the target if the no_reboot flag is omitted or set to False. If the reboot fails to boot the requested OS version, the target rolls back to the previous OS package.

Note:

Junos devices do not support the standby_supervisor field in the ActivateRequest message.

Junos OS Evolved 22.2R1

Install()

Transfer a software image onto the target.

Note:

Junos devices do not support the standby_supervisor field in the TransferRequest message.

Junos OS Evolved 22.2R1

Verify()

Check the running OS version. This RPC may be called multiple times while the target boots until successful.

Note:

Junos devices do not support verify_standby for VerifyResponse.

Junos OS Evolved 22.2R1

Network Device Configuration

Before you begin:

No additional configuration is required to use the OS service RPCs.

Example: Install and Activate

In this example, the client executes the gnoi_os_install_activate.py Python application, which performs the following operations:

  • Copies the software package from the local network management system to the network device.
  • Installs the package on the network device.
  • Reboots the network device, thus activating the new software image.

The application calls the Install() RPC with the InstallRequest() message to transfer the file. The application tracks the progress of the file transfer by emitting progress messages at each 10 percent transfer completion interval. If the file transfer is successful, the application then calls the Activate() RPC to install the image and reboot the target.

The application imports the grpc_channel module to establish the channel. The grpc_channel module is described in Configure gNOI Services. The application's arguments are stored in the args_os_install_activate.txt file. The application and argument files are as follows:

gnoi_os_install_activate.py

args_os_install_activate.txt

Note:

Starting in Junos OS Evolved Release 23.4R1, the version field in the Activate(), Install(), and Verify() RPCs uses the software version string (as displayed in /system/state/software-version) instead of the package name.

Execute the Application

When the client executes the application, the application copies the package from the local device to the /var/tmp directory on the network device, installs the package, and then reboots the device to complete the installation.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
23.4R1-EVO
Starting in Junos OS Evolved Release 23.4R1, the version field in the Activate(), Install(), and Verify() RPCs uses the software version string (as displayed in /system/state/software-version) instead of the package name.