Skip to content

Commit

Permalink
59 fabric dpp check (#76)
Browse files Browse the repository at this point in the history
* new validation for CSCwf05073

* cosmetic change

* Update aci-preupgrade-validation-script.py

Co-authored-by: takishida <[email protected]>

* Update aci-preupgrade-validation-script.py

Co-authored-by: takishida <[email protected]>

* Update docs/docs/validations.md

Co-authored-by: takishida <[email protected]>

* Update docs/docs/validations.md

Co-authored-by: takishida <[email protected]>

* Update docs/docs/validations.md

Co-authored-by: takishida <[email protected]>

* Update docs/docs/validations.md

Co-authored-by: takishida <[email protected]>

* modify affected versions

* query for dpp on + update tests

---------

Co-authored-by: takishida <[email protected]>
Co-authored-by: gmonroy <[email protected]>
  • Loading branch information
3 people authored May 7, 2024
1 parent 80bc006 commit e1de09f
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 0 deletions.
30 changes: 30 additions & 0 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,34 @@ def fabric_port_down_check(index, total_checks, **kwargs):
return result


def fabric_dpp_check(index, total_checks, tversion, **kwargs):
title = 'CoS 3 with Dynamic Packet Prioritization'
result = PASS
msg = ''
headers = ["Potential Defect", "Reason"]
data = []
recommended_action = 'Change the target version to the fixed version of CSCwf05073'
doc_url = 'https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwf05073'
print_title(title, index, total_checks)

if not tversion:
print_result(title, MANUAL, "Target version not supplied. Skipping.")
return MANUAL

lbpol_api = 'lbpPol.json'
lbpol_api += '?query-target-filter=eq(lbpPol.pri,"on")'

lbpPol = icurl('class', lbpol_api)
if lbpPol:
if ((tversion.newer_than("5.1(1h)") and tversion.older_than("5.2(8e)")) or
(tversion.major1 == "6" and tversion.older_than("6.0(3d)"))):
result = FAIL_O
data.append(["CSCwf05073", "Target Version susceptible to Defect"])

print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url)
return result


if __name__ == "__main__":
prints(' ==== %s%s, Script Version %s ====\n' % (ts, tz, SCRIPT_VERSION))
prints('!!!! Check https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script for Latest Release !!!!\n')
Expand Down Expand Up @@ -3144,6 +3172,8 @@ def fabric_port_down_check(index, total_checks, **kwargs):
sup_hwrev_check,
sup_a_high_memory_check,
vmm_active_uplinks_check,
fabric_dpp_check,

]
summary = {PASS: 0, FAIL_O: 0, FAIL_UF: 0, ERROR: 0, MANUAL: 0, NA: 0, 'TOTAL': len(checks)}
for idx, check in enumerate(checks):
Expand Down
10 changes: 10 additions & 0 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Items | Defect | This Script
[Spine SUP HW Revision Check][d9] | CSCwb86706 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
[SUP-A/A+ High Memory Usage][d10] | CSCwh39489 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
[VMM Uplink Container with empty Actives][d11] | CSCvr96408 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
[CoS 3 with Dynamic Packet Prioritization][d12] | CSCwf05073 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:

[d1]: #ep-announce-compatibility
[d2]: #eventmgr-db-size
Expand All @@ -154,6 +155,7 @@ Items | Defect | This Script
[d9]: #spine-sup-hw-revision
[d10]: #sup-aa-high-memory-usage
[d11]: #vmm-uplink-container-with-empty-actives
[d12]: #cos-3-with-dynamic-packet-prioritization



Expand Down Expand Up @@ -1604,7 +1606,15 @@ Due to the defect CSCwb86706, ACI modular spine switches may not be able to boot

The script checks if the version and the SUP modules are susceptible to the defect.

### CoS 3 with Dynamic Packet Prioritization

Due to the defect CSCwf05073, ACI unexpectedly assigning a COS3 value to traffic egressing front ports.

In certain cases, such as when frames goes through FCoE supported devices, these get classified into the no drop FCoE class. In FCoE devices, this can cause drop of packets when the packet length is higher than the allowed 2184 bytes.

For example, on the UCS Fabric Interconnect COS3 value is hardcoded for fiber channel (FC) or fiber channel over ethernet (FCoE) traffic. FC/FCoE traffic is highly sensitive and is treated as non-droppable, and cannot exceed MTU of 2184 bytes long.

This script checks if the target version is susceptible to CSCwf05073 and dynamic packet prioritization feature is set to "on".
### SUP-A/A+ High Memory Usage

Due to the increased memory utilization from 6.0(3), N9K-SUP-A or N9K-SUP-A+ will likely experience constant high memory utilization.
Expand Down
1 change: 1 addition & 0 deletions tests/fabric_dpp_check/lbpPol_NEG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
14 changes: 14 additions & 0 deletions tests/fabric_dpp_check/lbpPol_POS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"lbpPol": {
"attributes": {
"dlbMode": "off",
"dn": "uni/fabric/lbp-default",
"hashGtp": "no",
"mode": "traditional",
"name": "default",
"pri": "on"
}
}
}
]
69 changes: 69 additions & 0 deletions tests/fabric_dpp_check/test_fabric_dpp_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import os
import pytest
import logging
import importlib
from helpers.utils import read_data

script = importlib.import_module("aci-preupgrade-validation-script")

log = logging.getLogger(__name__)
dir = os.path.dirname(os.path.abspath(__file__))


# icurl queries
lbpPol = 'lbpPol.json'
lbpPol += '?query-target-filter=eq(lbpPol.pri,"on")'

@pytest.mark.parametrize(
"icurl_outputs, tversion, expected_result",
[
# DPP is on
(
{lbpPol: read_data(dir, "lbpPol_POS.json")},
"5.2(2h)",
script.FAIL_O,
),
(
{lbpPol: read_data(dir, "lbpPol_POS.json")},
"5.2(8e)",
script.PASS,
),
(
{lbpPol: read_data(dir, "lbpPol_POS.json")},
"6.0(2h)",
script.FAIL_O,
),
(
{lbpPol: read_data(dir, "lbpPol_POS.json")},
"6.0(3d)",
script.PASS,
),
# DPP is off
(
{lbpPol: read_data(dir, "lbpPol_NEG.json")},
"5.0(2h)",
script.PASS,
),
(
{lbpPol: read_data(dir, "lbpPol_NEG.json")},
"5.2(8e)",
script.PASS,
),
(
{lbpPol: read_data(dir, "lbpPol_NEG.json")},
"6.0(2h)",
script.PASS,
),
(
{lbpPol: read_data(dir, "lbpPol_NEG.json")},
"6.0(3d)",
script.PASS,
),
],
)
def test_logic(mock_icurl, tversion, expected_result):
result = script.fabric_dpp_check(
1, 1, script.AciVersion(tversion)
)
assert result == expected_result

0 comments on commit e1de09f

Please sign in to comment.