Skip to content

Commit 7954165

Browse files
authored
Merge pull request #1 from datacenter/master
feat: Add pre-upgrade warning for APIC 6.2.1 that downgrade is not su…
2 parents 2ac5cd8 + 128ab55 commit 7954165

3 files changed

Lines changed: 86 additions & 0 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6007,6 +6007,25 @@ def apic_vmm_inventory_sync_faults_check(**kwargs):
60076007
recommended_action=recommended_action,
60086008
doc_url=doc_url)
60096009

6010+
6011+
@check_wrapper(check_title='APIC downgrade compatibility when crossing 6.2 release')
6012+
def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs):
6013+
result = NA
6014+
headers = ["Current version", "Target Version", "Warning"]
6015+
data = []
6016+
recommended_action = 'No action required. Just be aware of the downgrade limitation after the upgrade.'
6017+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-downgrade-compatibility-when-crossing-62-release'
6018+
6019+
if not tversion or not cversion:
6020+
return Result(result=MANUAL, msg=TVER_MISSING)
6021+
if cversion.older_than("6.2(1a)") \
6022+
and (tversion.same_as("6.2(1a)") or tversion.newer_than("6.2(1a)")):
6023+
result = MANUAL
6024+
data.append([cversion, tversion, "Downgrading APIC from 6.2(1)+ to pre-6.2(1) will not be supported."])
6025+
6026+
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
6027+
6028+
60106029
# ---- Script Execution ----
60116030

60126031

@@ -6094,6 +6113,7 @@ class CheckManager:
60946113
post_upgrade_cb_check,
60956114
validate_32_64_bit_image_check,
60966115
fabric_link_redundancy_check,
6116+
apic_downgrade_compat_warning_check,
60976117

60986118
# Faults
60996119
apic_disk_space_faults_check,

docs/docs/validations.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Items | This Script
3636
[6.0(2)+ requires 32 and 64 bit switch images][g16] | :white_check_mark: | :no_entry_sign:
3737
[Fabric Link Redundancy][g17] | :white_check_mark: | :no_entry_sign:
3838
[APIC Database Size][g18] | :white_check_mark: | :no_entry_sign:
39+
[APIC downgrade compatibility when crossing 6.2 release][g19]| :white_check_mark: | :no_entry_sign:
3940

4041
[g1]: #compatibility-target-aci-version
4142
[g2]: #compatibility-cimc-version
@@ -55,6 +56,7 @@ Items | This Script
5556
[g16]: #602-requires-32-and-64-bit-switch-images
5657
[g17]: #fabric-link-redundancy
5758
[g18]: #apic-database-size
59+
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
5860

5961
### Fault Checks
6062
Items | Faults | This Script | APIC built-in
@@ -495,6 +497,38 @@ For current version is 6.1(3f):
495497
In either scenario, contact TAC to collect a database dump of the flagged DME(s) and shard(s) for further analysis.
496498

497499

500+
### APIC downgrade compatibility when crossing 6.2 release
501+
502+
APIC 6.2(1) release introduces significant optimizations to the APIC upgrade process, including shorter upgrade time and an orchestrated workflow across the cluster with fewer failure points. This release includes an architecture change on APIC, so APIC running 6.2(1) or newer (e.g., 6.2(1a)) cannot be downgraded to any pre-6.2(1) version (e.g., 6.1(4h)).
503+
504+
Upgrading from pre-6.2(1) to 6.2(1)+ is supported; however, rollback (downgrade) after such an upgrade is not possible.
505+
506+
This check alerts you if you are crossing the 6.2 boundary, beyond which downgrade compatibility is lost. No additional user action is required.
507+
508+
!!! note
509+
Switch upgrade architecture hasn't been changed in 6.2(1)/16.2(1). The limitation of downgrade compatibility between pre-/post-6.2(1) versions is only for APIC.
510+
511+
!!! example
512+
These are examples for upgrade/downgrade paths to show which downgrade compatibility is lost.
513+
514+
Upgrade:
515+
516+
* 6.1(4) -> **6.2(1)**: Supported
517+
* **6.2(1)** -> 6.2(2): Supported
518+
519+
Downgrade:
520+
521+
* **6.2(1)** -> 6.1(4): Not Supported !!! - The API request gets rejected on APIC.
522+
* 6.2(2) -> **6.2(1)**: Supported
523+
524+
Note that this is just one example. See [APIC Upgrade/Downgrade Matrix][2] for the full list of supported version combinations.
525+
526+
!!! tip
527+
Make sure to collect the latest configuration backup before you upgrade your APICs from pre-6.2(1) to 6.2(1)+ so that Cisco TAC can perform the fabric recovery process in the case of emergency where you need to downgrade your APICs to the previous version (i.e. 6.2(1)+ -> pre-6.2(1)).
528+
529+
If it's for a lab environment, you can initialize the fabric and perform a fresh ISO installation of pre-6.2(1) on APICs.
530+
531+
498532
## Fault Check Details
499533

500534
### APIC Disk Space Usage
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import importlib
2+
import logging
3+
import os
4+
import pytest
5+
6+
script = importlib.import_module("aci-preupgrade-validation-script")
7+
8+
log = logging.getLogger(__name__)
9+
dir = os.path.dirname(os.path.abspath(__file__))
10+
11+
test_function = "apic_downgrade_compat_warning_check"
12+
13+
14+
@pytest.mark.parametrize(
15+
"cversion, tversion, expected_result",
16+
[
17+
(None, None, script.MANUAL),
18+
("4.2(1b)", None, script.MANUAL),
19+
(None, "5.2(2a)", script.MANUAL),
20+
("5.2(2a)", "6.1(4a)", script.NA),
21+
("6.1(3a)", "6.1(4c)", script.NA),
22+
("6.1(3a)", "6.2(1a)", script.MANUAL),
23+
("6.1(3a)", "6.2(2a)", script.MANUAL),
24+
("6.2(1a)", "6.2(2c)", script.NA),
25+
],
26+
)
27+
def test_logic(run_check, mock_icurl, cversion, tversion, expected_result):
28+
result = run_check(
29+
cversion=script.AciVersion(cversion) if cversion else None,
30+
tversion=script.AciVersion(tversion) if tversion else None,
31+
)
32+
assert result.result == expected_result

0 commit comments

Comments
 (0)