Skip to content

Conversation

@welkin-he
Copy link
Collaborator

No description provided.

monrog2 and others added 29 commits June 25, 2025 14:52
* Clean up get_vpc_nodes() and its pytest

* Split the main script execution code into each func and add pytest

* Retire json_log and adopt json per rule for both PUV and regular use + linting
…on (#259)

* feat: Support QA version and AciVersion instance as input in AciVersion

* fix: Use supported version format in older_than

* fix: Use ValueError in AciVersion
* -c (cversion) and -d (debug_function) for dev testing

* pytest fix WIP

* fixed pytest
A new decorator `@check_wrapper` is to move most of the I/O functionalities,
such as printing and writing the result into a file, outside of each
check function so that each check can focus on the validation logic
itself by minimizing the impact from a requirement change in the output
format and so on.
To support this, a new class `Result` is also introduced to make it
clear what a check function is expected to return. As long as `Result`
class is returned, the decorator `@check_wrapper` handles the printing
them to stdout and files.
@welkin-he welkin-he requested a review from monrog2 July 17, 2025 09:26
Copy link
Collaborator

@monrog2 monrog2 left a comment

Choose a reason for hiding this comment

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

Review changes / questions. Use the new pytest cmd_outputs fixture for subprocess check uniformity, let me know if you have questions/suggestions on it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

update pytest dir + filename to match function name update

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

welkin-he and others added 10 commits July 24, 2025 00:46
Applied the same naming change to test.
 Changes to be committed:
	modified:   aci-preupgrade-validation-script.py
	modified:   docs/docs/validations.md
	renamed:    tests/large_apic_database_check/infraWiNode.json -> tests/apic_database_size_check/infraWiNode.json
	renamed:    tests/large_apic_database_check/test_large_apic_database_check.py -> tests/apic_database_size_check/test_large_apic_database_check.py

 Changes not staged for commit:
	modified:   aci-preupgrade-validation-script.py
	modified:   tests/apic_database_size_check/test_large_apic_database_check.py
monrog2
monrog2 previously approved these changes Jul 25, 2025
Copy link
Collaborator

@monrog2 monrog2 left a comment

Choose a reason for hiding this comment

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

pytests good, intergration tests good. merging

Copy link
Collaborator

@monrog2 monrog2 left a comment

Choose a reason for hiding this comment

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

good for real this time

@monrog2
Copy link
Collaborator

monrog2 commented Jul 25, 2025

latest pytest output:

[Check  1/1] APIC Database Size...                                                                               FAIL - UPGRADE FAILURE!!
  APIC ID  DME     Class Name    Object Count
  -------  ---     ----------    ------------
  2        vmmmgr  aaaIRbacRule  1600000
  2        vmmmgr  compProv      1800000
  2        vmmmgr  compatCtlrFw  1700000

  Recommended Action: Contact Cisco TAC to investigate all flagged high object counts
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-database-size


[Check  1/1] APIC Database Size...                                                                                                   PASS
[Check  1/1] APIC Database Size...                                                                                                   PASS
[Check  1/1] APIC Database Size...                                                                               FAIL - UPGRADE FAILURE!!
  APIC ID  DME           Shard   Size
  -------  ---           -----   ----
  2        ifc_eventmgr  S11_R0  5120.8M

  Recommended Action: Contact Cisco TAC to investigate all flagged large DB sizes
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-database-size


[Check  1/1] APIC Database Size...                                                                               FAIL - UPGRADE FAILURE!!
  APIC ID  DME     Class Name    Object Count
  -------  ---     ----------    ------------
  4        vmmmgr  aaaIRbacRule  1600000
  4        vmmmgr  compProv      1800000
  4        vmmmgr  compatCtlrFw  1700000

  Recommended Action: Contact Cisco TAC to investigate all flagged high object counts
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-database-size


[Check  1/1] APIC Database Size...                                                                                                   PASS
[Check  1/1] APIC Database Size...                                                                                                   PASS
[Check  1/1] APIC Database Size...                                                                               FAIL - UPGRADE FAILURE!!
  APIC ID  DME           Shard   Size
  -------  ---           -----   ----
  4        ifc_eventmgr  S11_R0  5120.8M

  Recommended Action: Contact Cisco TAC to investigate all flagged large DB sizes
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-database-size


[Check  1/1] APIC Database Size... acidiag command not available to current user                                    MANUAL CHECK REQUIRED
[Check  1/1] APIC Database Size... acidiag command not available to current user                                    MANUAL CHECK REQUIRED

@monrog2 monrog2 merged commit a0dd999 into master Jul 25, 2025
3 checks passed
@monrog2 monrog2 deleted the welkin-large-db-v31 branch July 25, 2025 18:22
@monrog2 monrog2 linked an issue Jul 25, 2025 that may be closed by this pull request
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.

NewValidation: APIC Large DB check

3 participants