Skip to content

Fix Arista failures in telemetry_interface_last_change_test (gNMI-1.25)#5292

Open
smharis-arista wants to merge 1 commit intoopenconfig:mainfrom
smharis-arista:pr-gnmi-1.25
Open

Fix Arista failures in telemetry_interface_last_change_test (gNMI-1.25)#5292
smharis-arista wants to merge 1 commit intoopenconfig:mainfrom
smharis-arista:pr-gnmi-1.25

Conversation

@smharis-arista
Copy link
Copy Markdown

@smharis-arista smharis-arista commented Apr 2, 2026

Issue#1
Add subinterface_0_state_unsupported deviation for Arista as a few state telemetry is not populated on the default (index 0) subinterface (both LAG and Ethernet). The deviation is defined broadly to cover any unsupported state on subinterface 0, but in this PR it is used specifically to skip last-change validation while parent interface validation continues -- Please see https://partnerissuetracker.corp.google.com/issues/456175792

Issue#2
Fix LAGMemberFlap and OTGLAGFlap timeout by expecting LOWER_LAYER_DOWN oper-status on Arista when the LAG goes down due to member port disable or link loss. The oper-status remains DOWN when LAG itself is shut.

Arista's default behavior is

  1. When the only member interface of a port-channel (LAG) is shut down, the operation status (operStatus) on the port-channel interface is set to lowerLayerDown.
  2. When The LAG itself is shut down, the operation status (operStatus) on the port-channel interface is set to Down.

The existing vendor checks are not touched and abstracted into a single logic since they don't seem to align properly with Arista's default behavior.

Add subinterface_0_state_unsupported deviation for Arista as
state telemetry is not populated on the default (index 0) subinterface
(both LAG and Ethernet). The deviation is defined broadly to cover
any unsupported state on subinterface 0, but in this PR it is used
specifically to skip last-change validation while parent interface
validation continues.

Fix LAGMemberFlap and OTGLAGFlap timeout by expecting
LOWER_LAYER_DOWN oper-status on Arista when the LAG goes down due
to member port disable or link loss. The oper-status remains
DOWN when LAG itself is shutdown.
@smharis-arista smharis-arista requested review from a team as code owners April 2, 2026 11:11
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 2, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses specific test failures observed on Arista devices within the telemetry_interface_last_change_test suite. It introduces a new platform deviation to account for Arista's behavior regarding state population on implicitly created subinterface 0, allowing the test to conditionally bypass validation for this specific scenario. Additionally, it refines the expected operational status for LAG interfaces during flap events on Arista, ensuring test accuracy when member ports are disabled or links are lost.

Highlights

  • Arista Subinterface 0 Deviation: Introduced a new deviation subinterface_0_state_unsupported for Arista devices, acknowledging that they may not populate state on implicitly created subinterface 0.
  • Conditional Last-Change Validation: Modified telemetry_interface_last_change_test to conditionally skip last-change validation for subinterface 0 on Arista devices when the new deviation is enabled.
  • LAG Oper-Status Adjustment: Updated LAG flap tests (LAGMemberFlap, OTGLAGFlap) for Arista to expect LOWER_LAYER_DOWN as the operational status when a LAG goes down due to member port disablement or link loss.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a new deviation, subinterface_0_state_unsupported, to accommodate devices that do not report state for implicitly created subinterface 0. Corresponding updates were made to the telemetry interface last change tests to conditionally skip subinterface checks. Additionally, vendor-specific logic was added for Arista LAG flap tests. The reviewer suggested abstracting the vendor-specific operational status logic to enhance maintainability and promote reusability across different platforms.

Comment on lines +188 to +190
if dut.Vendor() == ondatra.ARISTA && (testName == "LAGMemberFlap" || testName == "OTGLAGFlap") {
targetOperStatus = oc.Interface_OperStatus_LOWER_LAYER_DOWN
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The condition for Arista LAG flap timeout is specific to LAGMemberFlap and OTGLAGFlap. Consider if this logic should be abstracted or if there is a more generic way to handle vendor-specific oper-status expectations for LAG flaps to improve maintainability, as constants and logic applicable to multiple vendors should be kept general to promote reusability.

References
  1. Constants that may be applicable to multiple vendors in the future should be kept general, even if they are currently used in a vendor-specific context, to promote reusability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant