Skip to content

crm_stats_ipv6_route_available counter was not decremented#12186

Merged
kevinskwang merged 22 commits intosonic-net:masterfrom
anshuldubela:anshuldubela/crm_stats_ipv6_route_avai_count_dec
Aug 14, 2024
Merged

crm_stats_ipv6_route_available counter was not decremented#12186
kevinskwang merged 22 commits intosonic-net:masterfrom
anshuldubela:anshuldubela/crm_stats_ipv6_route_avai_count_dec

Conversation

@anshuldubela
Copy link
Contributor

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

anshuldubela and others added 21 commits August 1, 2023 14:29
"tests/dualtor/test_standby_tor_upstream_mux_toggle.py:89:121: E501 line too long (123 > 120 characters)"
"tests/dualtor/test_standby_tor_upstream_mux_toggle.py:89:121: E501 line too long (123 > 120 characters)"
    # 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.
        # For Cisco-8000 devices, hardware counters are statistical-based with +/- 1 entry tolerance.
        # Hence, the available counter may not increase as per initial value.
Removed the extra line.
Fix below pre-commit error:
tests/dualtor/test_standby_tor_upstream_mux_toggle.py:95:39: E225 missing whitespace around operator
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
Signed-off-by: Anshul Dubela <[email protected]>
@anshuldubela anshuldubela changed the title Anshuldubela/crm_stats_ipv6_route_available counter was not decremented MIGSOFTWAR-11400 Anshuldubela/crm_stats_ipv6_route_available counter was not decremented Mar 27, 2024
@anshuldubela anshuldubela changed the title MIGSOFTWAR-11400 Anshuldubela/crm_stats_ipv6_route_available counter was not decremented Anshuldubela/crm_stats_ipv6_route_available counter was not decremented Mar 27, 2024
@anshuldubela anshuldubela changed the title Anshuldubela/crm_stats_ipv6_route_available counter was not decremented crm_stats_ipv6_route_available counter was not decremented Mar 27, 2024
@kevinskwang
Copy link
Contributor

@anshuldubela could you fix the conflict?

@anshuldubela
Copy link
Contributor Author

@kevinskwang Please review.

@kevinskwang kevinskwang merged commit e4f0946 into sonic-net:master Aug 14, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 14, 2024
…#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

Cherry-pick PR to 202405: #14104

mssonicbld pushed a commit that referenced this pull request Aug 14, 2024
* 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]>
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
…#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]>
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
…#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]>
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.

3 participants