controller_card_redundancy_test - openconfig/featureprofiles GitHub Wiki
- Collect inventory data for each controller card.
- Verify that the last restart time is updated.
-
Collect the following attributes for each component of
CONTROLLER_CARDtype and verify correctness (mostly non-empty strings):- /components/component/state/empty
- /components/component/state/location
- /components/component/state/oper-status
- /components/component/state/switchover-ready
- /components/component/state/redundant-role
- /components/component/state/last-switchover-time
- /components/component/state/last-switchover-reason/trigger
- /components/component/state/last-switchover-reason/details
- /components/component/state/last-reboot-time
- /components/component/state/last-reboot-reason
- /components/component/state/description
- /components/component/state/hardware-version
- /components/component/state/id
- /components/component/state/mfg-name
- /components/component/state/name
- /components/component/state/parent
- /components/component/state/part-no
- /components/component/state/serial-no
- /components/component/state/type
-
Store the list of present components of
CONTROLLER_CARDtype.
- Verify that all controller cards have
switchover-ready=TRUE. - Collect and store the
redundant-rolefor each controller card as "previous-role". - Initiate controller card switchover.
- Periodically (60 sec interval) attempt to get
state/redundant-roleandstate/switchover-readyfor both CONTROLLER_CARDS until a successful response is received, but for no longer than 20 min.- Collect
redundant-rolefor each controller card. Compare it with the "previous-role".- For the controller card with the current "PRIMARY" role, the previous role must be "SECONDARY".
- For the controller card with the current "SECONDARY" role, the previous role must be "PRIMARY".
- Collect
- Periodically check
state/switchover-readyuntil (switchover-ready=TRUEon all controller cards ORlast-switchover-timeis more than 20 min ago).- Wait (5 min).
- Verify that all controller cards have
switchover-ready=TRUE; if so, the test PASSED.
- Verify that all controller cards have
switchover-ready=TRUE. - Select the component with
redundant-role=PRIMARYand store its name as "previous_primary". - Verify and power down the "previous_primary" component which should have already been switch over in the previous sub-test. Wait 5s.
- Collect
redundant-roleandoper-statusfrom all components ofCONTROLLER_CARDtype as collected in test 1.- Verify that the "previous_primary" controller
oper-statusis notACTIVEand/or itspower-admin-stateisPOWER_DISABLED. - Verify that exactly one controller card has
redundant-role=PRIMARYandoper-status=ACTIVE. - Depending on the implementation, the above leaves may not be returned for the "previous_primary" controller card. This satisfies the condition that this controller's
oper-statusis notACTIVE, and itsredundant-roleis notPRIMARY. - If the gNMI client can get this information, it is assumed that controller card redundancy works. More thorough tests of failover are part of forwarding tests.
- Verify that the "previous_primary" controller
- Power up the "previous_primary" controller card.
- Wait until all controller cards have
switchover-ready=TRUE(cleanup).
- Select the component with
redundant-role=SECONDARY. - Store the
last-reboot-timefor this component as "previous-reboot-time". - Power down this component, wait 60 sec.
- Power up this component.
- Wait.
- Get the
last-reboot-timeand compare it with the "previous-reboot-time".- The "previous-reboot-time" must be smaller (earlier) than the recently collected
last-reboot-time.
- The "previous-reboot-time" must be smaller (earlier) than the recently collected
{}paths:
# Telemetry Parameter coverage
/components/component/controller-card/state/power-admin-state:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/empty:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/location:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/oper-status:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/switchover-ready:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/redundant-role:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/last-switchover-time:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/last-switchover-reason/trigger:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/last-switchover-reason/details:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/last-reboot-time:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/last-reboot-reason:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/description:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/hardware-version:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/id:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/mfg-name:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/name:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/parent:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/part-no:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/serial-no:
platform_type: ["CONTROLLER_CARD"]
/components/component/state/type:
platform_type: ["CONTROLLER_CARD"]
rpcs:
gnmi:
gNMI.Set:
union_replace: true
gNMI.Subscribe:
on_change: true
gnoi:
system.System.SwitchControlProcessor:
system.System.Reboot:- MFF