Skip to content

[action] [PR:12186] crm_stats_ipv6_route_available counter was not decremented#14104

Merged
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/12186
Aug 14, 2024
Merged

[action] [PR:12186] crm_stats_ipv6_route_available counter was not decremented#14104
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/12186

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

issue

if check_available_counters and not (crm_stats_route_available - new_crm_stats_route_available >= 1):
for i in range(total_routes):
RESTORE_CMDS["test_crm_route"].append(route_del_cmd.format(asichost.ip_cmd, i, nh_ip))
> pytest.fail(""crm_stats_ipv{}_route_available" counter was not decremented".format(ip_ver))
E Failed: "crm_stats_ipv6_route_available" counter was not decremented

Summary:
Fixes # (issue)
As per the detailed UT with crm/test_crm.py::test_crm_route, below are my observations:

  • While CRM_POLLING_INTERVAL we can opt for CRM_UPDATE_TIME = 5 as FDB table get repopulated post 5msec which tends to fail our test checks.
  • While initial stage of testcase post route add extra 10msec to gather exact stats.
  • As for Cisco-8000 devices, hardware counters are statistical-based with +/- 1 entry tolerance. Hence, the available counter may not increase as per initial value.
    crm_stats_route_available - new_crm_stats_route_available > 1

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…#12186)

* MIGSOFTWAR-8454 Unmatched CRM facts

Signed-off-by: Anshul Dubela <[email protected]>

* MIGSOFTWAR-8454 Unmatched CRM facts

Signed-off-by: Anshul Dubela <[email protected]>

* Update test_standby_tor_upstream_mux_toggle.py

"tests/dualtor/test_standby_tor_upstream_mux_toggle.py:89:121: E501 line too long (123 > 120 characters)"

* Update test_standby_tor_upstream_mux_toggle.py

"tests/dualtor/test_standby_tor_upstream_mux_toggle.py:89:121: E501 line too long (123 > 120 characters)"

* Update test_standby_tor_upstream_mux_toggle.py

    # For Cisco-8000 devices, hardware counters are statistical-based with +/- 1 entry tolerance.
    # Hence, the available counters may not increase as per initial value for multiple facts collected.

* Update utilities.py

        # For Cisco-8000 devices, hardware counters are statistical-based with +/- 1 entry tolerance.
        # Hence, the available counter may not increase as per initial value.

* Update utilities.py

Removed the extra line.

* Update test_standby_tor_upstream_mux_toggle.py

Fix below pre-commit error:
tests/dualtor/test_standby_tor_upstream_mux_toggle.py:95:39: E225 missing whitespace around operator

* Update utilities.py

Fixed Below pre-commit issue:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/common/utilities.py

* Unmatched CRM facts Rev

Signed-off-by: Anshul Dubela <[email protected]>

* MIGSOFTWAR-11400 crm_stats_ipv6_route_available counter was not decremented

Signed-off-by: Anshul Dubela <[email protected]>

---------

Signed-off-by: Anshul Dubela <[email protected]>
@mssonicbld
Copy link
Collaborator Author

Original PR: #12186

@mssonicbld mssonicbld merged commit d34dea3 into sonic-net:202405 Aug 14, 2024
yejianquan pushed a commit that referenced this pull request Sep 20, 2024
…4602)

Description of PR
#14104
Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue.

Summary:
Fixes # (issue)
CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed.

Approach
What is the motivation for this PR?
Revert the cisco specific change added in sonic-mgmt code.

How did you do it?
How did you verify/test it?
Verified running sonic mgmt tests/test_crm.py::test_crm_route

co-authorized by: [email protected]
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Sep 20, 2024
…nic-net#14602)

Description of PR
sonic-net#14104
Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue.

Summary:
Fixes # (issue)
CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed.

Approach
What is the motivation for this PR?
Revert the cisco specific change added in sonic-mgmt code.

How did you do it?
How did you verify/test it?
Verified running sonic mgmt tests/test_crm.py::test_crm_route

co-authorized by: [email protected]
yejianquan pushed a commit that referenced this pull request Sep 27, 2024
…ented, as we have a fix in platform side of code (#14775)

Description of PR
#14104
Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue.

This change is merged in master #14602
This is a conflict merge to 202405 branch.

Summary:
Fixes # (issue)

CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed.

Approach
What is the motivation for this PR?
Revert the cisco specific change added in sonic-mgmt code.

How did you do it?
How did you verify/test it?
Verified running sonic mgmt tests/test_crm.py::test_crm_route

co-authorized by: [email protected]
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
…nic-net#14602)

Description of PR
sonic-net#14104
Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue.

Summary:
Fixes # (issue)
CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed.

Approach
What is the motivation for this PR?
Revert the cisco specific change added in sonic-mgmt code.

How did you do it?
How did you verify/test it?
Verified running sonic mgmt tests/test_crm.py::test_crm_route

co-authorized by: [email protected]
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
…nic-net#14602)

Description of PR
sonic-net#14104
Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue.

Summary:
Fixes # (issue)
CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed.

Approach
What is the motivation for this PR?
Revert the cisco specific change added in sonic-mgmt code.

How did you do it?
How did you verify/test it?
Verified running sonic mgmt tests/test_crm.py::test_crm_route

co-authorized by: [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants