Repository navigation
Access (Untagged) Port Config check crashes on FEX attachment fault DN #481
Description
(use upvote 👍 for attentions)
Describe the bug
The Access (Untagged) Port Config (F0467 native-or-untagged-encap-failure) check returns an unexpected error when the fault is associated with an FEX attachment.
The current DN parser recognizes the standard fvStPathAtt form:
.../stpathatt-[{pathName}]/nwissues/fault-F0467
APIC model documentation also defines the fvExtStPathAtt form used for FEX attachments:
.../extstpathatt-[{pathName}]-extchid-{extChId}/nwissues/fault-F0467
When the FEX form does not match the current regex, the fallback path calls:
unformatted_data.append(fc, fault_description, recommended_action)Because list.append() accepts one argument, the check raises:
TypeError: append() takes exactly one argument (3 given)
This changes an actionable FAIL - OUTAGE WARNING!! finding into ERROR !! and prevents the fault details from being displayed.
Script output
The following output uses synthetic, non-customer-identifying values:
[Check 25/102] Access (Untagged) Port Config
(F0467 native-or-untagged-encap-failure)...
Unexpected Error: append() takes exactly one argument (3 given) ERROR !!
Traceback (most recent call last):
File "aci-preupgrade-validation-script.py", line <wrapper-line>, in wrapper
r = check_func(*args, **kwargs)
File "aci-preupgrade-validation-script.py", line <check-line>, in access_untagged_check
unformatted_data.append(fc, faultInst["faultInst"]["attributes"]["descr"], recommended_action)
TypeError: append() takes exactly one argument (3 given)
Representative scrubbed fault DN:
topology/pod-1/node-101/local/svc-policyelem-id-0/uni/epp/fv-[uni/tn-TENANT-A/ap-APP-A/epg-EPG-A]/node-101/extstpathatt-[eth1/10]-extchid-110/nwissues/fault-F0467
Representative scrubbed description:
Configuration failed for uni/tn-TENANT-A/ap-APP-A/epg-EPG-A node 101 eth1/10 on FEX 110 due to Only One Native or Untagged Encap Allowed on Interface
To Reproduce
-
Return an active
faultInstwhosechangeSetcontainsnative-or-untagged-encap-failure. -
Use the documented FEX DN form:
.../node-101/extstpathatt-[eth1/10]-extchid-110/nwissues/fault-F0467 -
Run
access_untagged_check. -
Observe that the DN does not match the
stpathatt-only regex. -
Observe the fallback raising
TypeErrorfromlist.append().
The current positive unit-test fixtures use only stpathatt-[...] DNs and assert only the final result, so they do not exercise this path.
Expected behavior
The check should support both APIC-documented direct attachment forms:
stpathatt-[{pathName}]
extstpathatt-[{pathName}]-extchid-{extChId}
For the FEX example, the check should return FAIL - OUTAGE WARNING!! and preserve the port and FEX ID in the failure details.
If a future or otherwise unrecognized DN is returned, the fallback should append one complete row:
unformatted_data.append([fc, fault_description, recommended_action])An unrecognized DN must produce an unformatted failure entry rather than an unexpected check error.
Additional context
APIC model documentation identifies:
fvStPathAttRN:stpathatt-[{pathName}]fvExtStPathAttRN:extstpathatt-[{pathName}]-extchid-{extChId}fvNwIssuesbeneath both attachment typesfaultInstRN:fault-{code}
Suggested regression coverage:
- Existing non-FEX
stpathattfault. - FEX
extstpathatt ... extchidfault. - Unknown or malformed DN exercising
unformatted_data. - Assertions for
dataandunformatted_data, not only the overall result.
Activity