Skip to content

434-dynamically-calculate-the-required-free-space-in-switch-bootflash - #441

Open
lovkeshsharma702 wants to merge 21 commits into
v4.2.1-devfrom
lovsharm_bootflash_modification
Open

lovkeshsharma702 wants to merge 21 commits into
v4.2.1-devfrom
lovsharm_bootflash_modification

Conversation

@lovkeshsharma702

Copy link
Copy Markdown
Collaborator

cover dynamic space check.

Testing logs when fabric on 5.2.8h.
-----------

fab1-apic1# python aci-preupgrade-validation-script.py -d switch_bootflash_usage_check -t "6.1(5e)"     
    ==== 2026-09-09T02-15-28+0000, Script Version v4.2.0  ====

!!!! 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...5.2(8h)
Lowest Switch Version...5.2(8h)

Target APIC version is overridden to 6.1(5e)

Collecting VPC Node IDs...

Progress: |████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 checks completed


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

[Check 1/1] Switch Node /bootflash usage...                                                                       FAIL - UPGRADE FAILURE!!
  Pod-ID  Node-ID  Avail (MB)  Required (MB)
  ------  -------  ----------  -------------
  1       105      5437.03     6518.78

  Recommended Action: Insufficient free space to download and extract the target image! Contact Cisco TAC for Support
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#switch-node-bootflash-usage



=== 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-09-09T02-15-28+0000.tgz

==== Script Version v4.2.0 FIN ====
fab1-apic1# python aci-preupgrade-validation-script.py -d switch_bootflash_usage_check -t "5.3(2b)"          
    ==== 2026-09-09T02-16-32+0000, Script Version v4.2.0  ====

!!!! 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...5.2(8h)
Lowest Switch Version...5.2(8h)

Target APIC version is overridden to 5.3(2b)

Collecting VPC Node IDs...

Progress: |████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 checks completed


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


=== Summary Result ===

PASS                        :  1
FAIL - OUTAGE WARNING!!     :  0
FAIL - UPGRADE FAILURE!!    :  0
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-09-09T02-16-32+0000.tgz

==== Script Version v4.2.0 FIN ====
fab1-apic1# python aci-preupgrade-validation-script.py -d switch_bootflash_usage_check -t "6.0(9e)"          
    ==== 2026-09-09T02-17-06+0000, Script Version v4.2.0  ====

!!!! 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...5.2(8h)
Lowest Switch Version...5.2(8h)

Target APIC version is overridden to 6.0(9e)

Collecting VPC Node IDs...

Progress: |████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 checks completed


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

[Check 1/1] Switch Node /bootflash usage...                                                                       FAIL - UPGRADE FAILURE!!
  Pod-ID  Node-ID  Avail (MB)  Required (MB)
  ------  -------  ----------  -------------
  1       105      5437.03     5989.18

  Recommended Action: Insufficient free space to download and extract the target image! Contact Cisco TAC for Support
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#switch-node-bootflash-usage



=== 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-09-09T02-17-06+0000.tgz

==== Script Version v4.2.0 FIN ====

@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 several cases where the new dynamic calculation can report PASS despite insufficient bootflash. Each item is documented inline with a concrete remediation and regression-test expectation.

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 aci-preupgrade-validation-script.py
Comment thread aci-preupgrade-validation-script.py

@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.

@lovkeshsharma702 I am requesting these two blocking changes. Both can produce a false PASS during the documented APIC-first upgrade sequence or after an image has been downloaded but still needs extraction.

Comment thread aci-preupgrade-validation-script.py Outdated
Comment thread aci-preupgrade-validation-script.py Outdated
lovkeshsharma702 and others added 6 commits September 14, 2026 16:40
Ensure bootflash validation reports the established target-version message before checking switch-version availability, with focused regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Distinguish pre-split and split-image upgrade scenarios, credit only the staged 32-bit image during boundary crossings, and document the API-based calculations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summarize what the dynamic bootflash check validates and update the stale sample result message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe the cleanup threshold, dynamic image-space calculation, downloaded-image handling, and validation outcomes without exposing implementation detail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@monrog2

monrog2 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

@lovkeshsharma702

Integration test summary

Integration testing was run across the actual fabric versions and six configured upgrade paths. Python 2.7 and Python 3.8 unit tests passed.

For the Switch Node /bootflash usage check:

  • The actual-version run produced two valid upgrade failures where available space was below the calculated requirement.
  • Other results correctly required manual review when the target version or firmware images were unavailable.
  • The configured-version runs could not fully exercise the new boundary calculations because the required target images were not present in the firmware repositories.
  • No exception or calculation regression attributable to this PR was observed.
  • The overall integration jobs reported failures because of unrelated lab authentication and connectivity issues.

Example complete check hit, with fabric identifiers scrubbed and the updated recommendation:

[Check  18/102] Switch Node /bootflash usage...                                                                   FAIL - UPGRADE FAILURE!!
  Pod-ID  Node-ID    Avail (MB)  Required (MB)
  ------  ---------  ----------  -------------
  <pod>   <node>     5807.31     6044.36
  Recommended Action: Remove old, unused switch images to free bootflash space, then re-run this validation. Contact Cisco TAC if sufficient space cannot be recovered.
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#switch-node-bootflash-usage

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.

2 participants