Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Sensor Power-State Management Support Using gNMI

You can use gNMI to manage the power state of the Routing Engines (controller cards) on a dual Routing Engine system. You can configure a Routing Engine to power off and remain powered off by using gNMI to set the OpenConfig path/components/component/controller-card/config/power-admin-state value to POWER_DISABLED.

When you configure the power state of the backup Routing Engine (secondary controller card) as POWER_DISABLED, the configuration takes effect immediately. The device powers off the Routing Engine and sets the config/power-admin-state to POWER_DISABLED. The Routing Engine remains powered off even through reboots. Similarly, setting the power state to POWER_ENABLED immediately brings the Routing Engine back online.

If you configure the power state of the primary Routing Engine as POWER_DISABLED, the configuration takes effect upon the next reboot or switchover. However, configuring POWER_DISABLED on the primary Routing Engine automatically triggers a switchover. Thus, after the primary Routing Engine assumes the backup role, it immediately powers off.

Consider the following rules before making changes to the power-admin-state of your device:

  • Only controller cards in the SECONDARY state/redundant-role honor changes in the config/power-admin-state to POWER_DISABLED.

  • On controller cards in the PRIMARY state/redundant-role, if you try to set config/power-admin-state to POWER_DISABLED, the operation is allowed. However, the state/power-admin-state may remain as POWER_ENABLED until the next switchover or reboot.

  • A switchover is initiated to change the role of PRIMARY to SECONDARY as soon as you configure the active Routing Engine as POWER_DISABLED.

A gNMI client can configure a Routing Engine to remain powered off, for example:

The following example uses the gNMI client gnmic to send a SetRequest to update the config/power-admin-state value to POWER_DISABLED for the backup Routing Engine (RE1):

Verify the configuration.

The OpenConfig configuration is equivalent to issuing the set system node offline node configuration mode command in the Junos OS Evolved configuration.

Use the show system nodes operational mode command to verify that the state of the Routing Engine is offline.

Similarly, you can re-enable the Routing Engine.

The following example uses the gNMI client gnmic to send a SetRequest to update the config/power-admin-state value to POWER_ENABLED for the backup Routing Engine (RE1) :

When you update the config/power-admin-state to POWER_ENABLED, the Routing Engine is brought online.