Skip to content

Added validation check for CSCwt58626#405

Open
muthu-ku wants to merge 11 commits into
datacenter:v4.2.0-devfrom
muthu-ku:CSCwt58626
Open

Added validation check for CSCwt58626#405
muthu-ku wants to merge 11 commits into
datacenter:v4.2.0-devfrom
muthu-ku:CSCwt58626

Conversation

@muthu-ku

@muthu-ku muthu-ku commented Jul 2, 2026

Copy link
Copy Markdown

Added new validation for the defect CSCwt58626.

This check will check if the InfraVLAN overlaps with any user-configured VLAN pool range in Access Policies.

Apic failure logs:

 python aci-preupgrade-validation-script.py --tversion "6.1(3g)" -d "infravlan_overlap_access_policy_check"
    ==== 2026-07-23T04-58-29+0000, Script Version v4.2.0-dev  ====

!!!! Check https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script for Latest Release !!!!

To use a non-default Login Domain, enter apic#DOMAIN\\USERNAME
Enter username for APIC login          : admin
Enter password for corresponding User  :

Gathering Node Information...

Current APIC Version...6.0(9e)
Lowest Switch Version...6.0(9e)

Target APIC version is overridden to 6.1(3g)

Collecting VPC Node IDs...101, 102, 103, 104

Progress: |----------------------------------------------------------------------------------------------------| 0/1 checks cProgress: |████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 checks completed


=== Check Result (failed only) ===

[Check 1/1] InfraVLAN Overlap in Access Policy VLAN Pools...                                                      FAIL - UPGRADE FAILURE!!
  InfraVLAN  Encap Block             VLAN Pool DN
  ---------  -----------             ------------
  3301       vlan-10 to vlan-4093    uni/infra/vlanns-[infra-vlan-pool]-static/from-[vlan-10]-to-[vlan-4093]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-akhila1/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-ashok/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-ashok2/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-burh414/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-dci_cluster/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-deep421/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-depro1/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-dualstack/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-experimentk8slab/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-fwardzic1/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-k8s_scale53/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-k8sdragan/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-k8sfwardzic/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-k8srkesetup1/from-[vlan-3301]-to-[vlan-3301]
  3301       vlan-3301 to vlan-3301  uni/vmmp-VMware/dom-k8s-scale-vmm/usrcustomaggr-k8srkesetup2/from-[vlan-3301]-to-[vlan-3301]

  Recommended Action: Remove InfraVLAN from VLAN pool block highligted or upgrade to fix version
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#infravlan-overlap-access-policy-check



=== Summary Result ===

PASS                        :  0
FAIL - OUTAGE WARNING!!     :  0
FAIL - UPGRADE FAILURE!!    :  1
MANUAL CHECK REQUIRED       :  0
POST UPGRADE CHECK REQUIRED :  0
N/A                         :  0
ERROR !!                    :  0
TOTAL                       :  1

    Pre-Upgrade Check Complete.
    Next Steps: Address all checks flagged as FAIL, ERROR or MANUAL CHECK REQUIRED

    Result output and debug info saved to below bundle for later reference.
    Attach this bundle to Cisco TAC SRs opened to address the flagged checks.

      Result Bundle: /data/techsupport/preupgrade_validator_2026-07-23T04-58-29+0000.tgz

==== Script Version v4.2.0-dev FIN ====


apic_failure_log.txt
apic_full_run_log.txt
pytest_full_run_log.txt

Comment thread docs/docs/validations.md Outdated
Comment thread tests/checks/infravlan_overlap_access_policy_check/lldpInst_infra_vlan.json Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread tests/checks/infravlan_overlap_access_policy_check/lldpInst_infra_vlan.json Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated

@lovkeshsharma702 lovkeshsharma702 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

all intigrated test passed.

Comment thread docs/docs/validations.md Outdated

Due to [CSCwt58626][77], when targeting APIC version 6.1(3f) to 6.1(5e) or 6.2(1g) , if the InfraVLAN overlaps with any user-configured VLAN pool range in Access Policies, fault `F4701` is raised for VLAN pools that include the InfraVLAN. After the upgrade, domains linked to those VLAN pools cannot be associated with new EPGs, although existing EPGs continue to function.

To avoid this issue, modify user VLAN pool ranges so that the InfraVLAN does not overlap with any configured block or select target version with fix.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@lovkeshsharma702 include some detail about the planned fix, otherwise this checks details will have to be updated again after release.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@lovkeshsharma702 include some detail about the planned fix, otherwise this checks details will have to be updated again after release.

@monrog2 this was a regression in 6.1(3f) to 6.1(5e) or 6.2(1g). fixed above 615 and 6.2.x. only 6.2.2eis release so far, hence fix version for 615 not mentioned in the bug. @muthu-ku please add 6.2.2e as fixed version in bug.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Main point of this one is to call out the behavior change implemented in the fixed versions.

my understanding is:
PD will block path binding on user tenant if the binding it pushing the infra VLAN.

HOWEVER, Infra tenant can do this without issue.

affected version behavior relies solely on access policy lookup, which means whether infra or user tenant, any extension of infra VLAN causes the fault + blocking condition seen today.

point for clarification is how this would affected vmm bindings for infra vlan within user tenant, such as k8 integration

@lovkeshsharma702 lovkeshsharma702 Jul 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@monrog2 check with Dev, they confirm fault raised if infra vlan found in any vlanpool in any tenant. we suggest cu not to use infra vlan in any of vlan pool, or move to fix version, where no fault is being raised.
@muthu-ku please update the "Due to [CSCwt58626][77], when targeting APIC version 6.1(3f) to 6.1(5e) or 6.2(1g) , if the InfraVLAN overlaps with any VLAN pool range in Access Policies, fault F4701 is raised for VLAN pools that include the InfraVLAN. After the upgrade, domains linked to those VLAN pools cannot be associated with new EPGs, although existing EPGs continue to function.

To avoid this issue, modify user VLAN pool ranges so that the InfraVLAN does not overlap with any configured vlan block or select target version with fix."

Comment thread aci-preupgrade-validation-script.py
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread docs/docs/validations.md Outdated
Comment on lines +6688 to +6692
try:
from datetime import timezone
threshold = datetime.now(timezone.utc).replace(tzinfo=None) - timedelta(hours=24)
except ImportError:
threshold = datetime.utcnow() - timedelta(hours=24)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this potion is needed to cover

 /data/techsupport/muthu/aci-preupgrade-validation-script.py:6688: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
threshold = datetime.utcnow() - timedelta(hours=24)

Python version	          Path taken	                                                                              Result
Python 2.x	          ImportError caught → datetime.utcnow()	                             ✅ Works
Python 3.0–3.11.        timezone import succeeds → datetime.now(timezone.utc)	✅ Works, no warning
Python 3.12+	         timezone import succeeds → datetime.now(timezone.utc)	✅ Works, no deprecation warning

@monrog2 monrog2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes for correctness against the current CSCwt58626 CDETS data and for fail-safe handling of APIC responses. Each concern is attached inline.

Comment thread aci-preupgrade-validation-script.py
encap_blocks = icurl('class', 'fvnsEncapBlk.json')
dn_pool_re = re.compile(r'vlanns-\[(?P<vlan_pool>[^\]]+)\]')
for obj in encap_blocks:
blk_attr = obj.get('fvnsEncapBlk', {}).get('attributes', {})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] Filter out non-affected internal blocks. The unfiltered fvnsEncapBlk class response also contains blocks with role: internal, but this loop treats every block as a user VLAN-pool block. A valid internal block containing the InfraVLAN therefore produces FAIL_UF; I reproduced that behavior with an existing internal-role fixture shape. The CDETS example is role: external. Please restrict evaluation to the affected role/object types, and add an internal-role regression case.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@monrog2 copy that. @muthu-ku please rework this to fetch the external block only.

Comment on lines +6748 to +6758
if not dn or not from_encap or not to_encap:
continue

pool_match = dn_pool_re.search(dn)
pool_name = pool_match.group('vlan_pool') if pool_match else '-'

try:
from_vlan = int(str(from_encap).split('-')[-1])
to_vlan = int(str(to_encap).split('-')[-1])
except (ValueError, TypeError):
continue

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] Do not turn unparseable APIC data into a PASS. Missing dn/from/to values and malformed VLAN values are silently skipped. If every returned block is malformed, data remains empty and the check reports PASS without establishing that no overlap exists; this is reproducible with a malformed-only response. Track these objects via unformatted_data and return ERROR (or the repository's equivalent incomplete-data result), with malformed-only and mixed valid/malformed tests.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@muthu-ku please work on the suggestions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

when you find unformatted Dn, exit loop and print error.

Comment thread aci-preupgrade-validation-script.py Outdated
continue

pool_match = dn_pool_re.search(dn)
pool_name = pool_match.group('vlan_pool') if pool_match else '-'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Preserve an actionable identifier for VMM objects. The canonical CDETS object DN is uni/vmmp-VMware/dom-.../usrcustomaggr-.../from-[vlan-...]-to-[vlan-...], which has no vlanns-[...] component. This code detects the overlap but renders the pool as -, so the operator cannot locate the object named by the recommended action. Use the full DN (or a parsed VMM domain/custom aggregate identifier) as the fallback instead of -.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@monrog2 do you have a vmm setup where i can check. i think when i checked in QA< i found a corresponding vlan pool created with "vlanns-" in db, hence suggested to ignore. but let me double check on this.

Comment thread docs/docs/validations.md Outdated

### Infravlan Overlap Access Policy Check

Due to [CSCwt58626][77], when targeting APIC version 6.1(3f) to 6.1(5e) or 6.2(1g) , if the InfraVLAN overlaps with any user-configured VLAN pool range in Access Policies, fault `F4701` is raised for VLAN pools that include the InfraVLAN. After the upgrade, domains linked to those VLAN pools cannot be associated with new EPGs, although existing EPGs continue to function.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Document the primary CDETS configuration, not only Access Policy pools. CSCwt58626 specifically reports Kubernetes and VMware VMM custom port groups generated by acc-provision, including usrcustomaggr objects annotated orchestrator:aci-containers-controller with containsInfraVlan: yes. Describing the scope only as user-configured VLAN pool ranges in Access Policies can lead affected VMM/Kubernetes users to dismiss the warning. Please include these orchestrator-created objects and their post-upgrade impact.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

copy that. @muthu-ku please update the bug and script document as well.

(
{
lldpInst_api: read_data(dir, "lldpInst_infra_vlan_multiple_entry.json"),
fvnsEncapBlk_api: read_data(dir, "fvnsEncapBlk_overlap_single_vlan_pool.json"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Add coverage using the actual CDETS object shape. The overlap fixtures only use synthetic vlanns-[pool] DNs and omit role, containsInfraVlan, and annotation, so they cannot catch the internal-role false positive or the unusable - identifier for VMM usrcustomaggr objects. Add a fixture based on the CDETS example, plus internal-role and malformed-object cases, and assert the displayed identifier as well as the result.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@muthu-ku lets see if can get the rn and role from the moquery to compare and whereever you find the conflicing Mo, report that whole DN .

Comment on lines +6748 to +6758
if not dn or not from_encap or not to_encap:
continue

pool_match = dn_pool_re.search(dn)
pool_name = pool_match.group('vlan_pool') if pool_match else '-'

try:
from_vlan = int(str(from_encap).split('-')[-1])
to_vlan = int(str(to_encap).split('-')[-1])
except (ValueError, TypeError):
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

when you find unformatted Dn, exit loop and print error.

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.

3 participants