Cisco APIC Installation and ACI Upgrade and Downgrade Guide

PDF

Cisco APIC Installation and ACI Upgrade and Downgrade Guide

Upgrade or downgrade switch software using the REST API

Want to summarize with AI?

Log in

Upgrades or downgrades switch software by configuring firmware and maintenance policies through the REST API. This process involves downloading images, defining node groups, and triggering the update process.


Procedure

1.

Download the switch image into the repository.

Example:

POST URL: https://<ip address>/api/node/mo/uni/fabric.xml
                        <firmwareRepoP>
                        <firmwareOSource name="Switch_Image_download" proto="http" url="http://<ip address>/<ver-no>"/>
                        </firmwareRepoP>
                    
2.

Post the appropriate policies to create a firmware group and a maintenance group with the necessary node IDs, depending on your software release:

  • For releases prior to Release 4.0(1), post the following policies to create a firmware group that consists of your switches with node IDs 101, 102, 103, 104, and to create a maintenance group with node IDs 101, 102, 103, 104:

    POST URL : https://<ip address>/api/node/mo/uni/fabric.xml
                                    <fabricInst>
                                    <firmwareFwP
                                    name="AllswitchesFwP"
                                    version="<ver-no>"
                                    ignoreCompat="true">
                                    </firmwareFwP>
                                    <firmwareFwGrp
                                    name="AllswitchesFwGrp" >
                                    <fabricNodeBlk name="Blk101"
                                    from_="101" to_="101">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk102"
                                    from_="102" to_="102">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk103"
                                    from_="103" to_="103">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk104"
                                    from_="104" to_="104">
                                    </fabricNodeBlk>
                                    <firmwareRsFwgrpp
                                    tnFirmwareFwPName="AllswitchesFwP">
                                    </firmwareRsFwgrpp>
                                    </firmwareFwGrp>
                                    <maintMaintP
                                    name="AllswitchesMaintP"
                                    runMode="pauseOnlyOnFailures" >
                                    </maintMaintP>
                                    <maintMaintGrp
                                    name="AllswitchesMaintGrp">
                                    <fabricNodeBlk name="Blk101"
                                    from_="101" to_="101">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk102"
                                    from_="102" to_="102">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk103"
                                    from_="103" to_="103">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk104"
                                    from_="104" to_="104">
                                    </fabricNodeBlk>
                                    <maintRsMgrpp
                                    tnMaintMaintPName="AllswitchesMaintP">
                                    </maintRsMgrpp>
                                    </maintMaintGrp>
                                    </fabricInst>
  • For Release 4.0(1) and later, post the following policies to create a firmware group that consists of your switches with node IDs 101, 102, 103, 104, and to create a maintenance group with node IDs 101, 102, 103, 104:

    POST URL : https://<ip address>/api/node/mo/uni/fabric.xml
                                    <fabricInst>   
                                    <maintMaintP
                                    version="<ver-no>"
                                    name="AllswitchesFwP"
                                    runMode="pauseOnlyOnFailures">
                                    </maintMaintP>
                                    <maintMaintGrp name="AllswitchesMaintGrp">
                                    <fabricNodeBlk name="Blk101" from_="101" to_="101">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk102" from_="102" to_="102">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk103" from_="103" to_="103">
                                    </fabricNodeBlk>
                                    <fabricNodeBlk name="Blk104" from_="104" to_="104">
                                    </fabricNodeBlk>
                                    <maintRsMgrpp tnMaintMaintPName="AllswitchesMaintGrp">
                                    </maintRsMgrpp>
                                    </maintMaintGrp>
                                    </fabricInst>
                                
  • For Release 5.1(1) and later, post the following policies to create a firmware group that consists of your switches with node IDs 101, 102, 103, 104, and to create a maintenance group with node IDs 101, 102, 103, 104:

    • Pre-upgrade validator (APIC)

      For APIC pre-validation
      GET URL - https://<ip address>/mqapi2/deployment.query.json?mode=validateCtrlrMaintP&targetVersion=6.1.(4h)
                                                  b. 
                                              
      Note

      The targetVersion parameter is set to 6.1.(4h) . This is the only accepted format for this API call.

      For Switch pre-validation

      POST URL - https://<ip address>/mqapi2/deployment.query.xml?mode=validateSwitchMaintPAsync
                                                  <syntheticMaintPSwitchDetails maintPName="POD2_LEAF_ODD" />
                                              

      Understanding the Switch Pre-Validation Response

      When you send a POST request using the asynchronous mode ( validateSwitchMaintPAsync ), the APIC initiates the pre-validation checks in the background and immediately returns the following response:
      "Started running checks"

      This response confirms that the validation process has started. It does not indicate that the checks are complete or provide the validation results. To retrieve the results, use the GET endpoint described below.

      Retrieving Asynchronous Pre-Validation Results

      After sending the asynchronous POST request, use the following GET request to retrieve the pre-validation status and results:
      GET URL - https://<APIC-IP>/mqapi2/deployment.query.json?mode=getSwitchPreValStatus

      Poll this endpoint after the POST request to monitor progress and retrieve the final validation results once all checks are complete.

      Switch Pre-Validation — Synchronous Option

      If you prefer to receive validation results immediately in a single call, without requiring a separate status retrieval step, use the synchronous (non-async) mode:
      POST URL - https://<APIC-IP>/mqapi2/deployment.query.json?mode=validateSwitchMaintP

      This call performs the pre-validation checks synchronously and returns the full results directly in the response. No follow-up GET request is needed.

    • Pre-Download Images to the Leaf and Spine Switches
      POST URL - https://<ip address>/api/node/mo/uni/fabric.xml
                                                  <fabricInst>
                                                  <maintMaintP downloadSt="triggered" name="
                                                  </maintMaintP>
                                                  <maintMaintGrp name="
                                                  <fabricNodeBlk name="blk102" from_="102" to_="102">
                                                  </fabricNodeBlk>
                                                  <maintRsMgrpp  tnMaintMaintPName="
                                                  </maintRsMgrpp>
                                                  </maintMaintGrp>
                                                  </fabricInst>
                                              
      Note

      If you specify triggered or untriggered values in the downloadSt attribute, these values are ignored.

    • Graceful Upgrade
      POST URL - https://<ip address>/api/node/mo/uni/fabric.xml
                                                  <fabricInst>
                                                  <maintMaintP downloadSt="triggered" name="
                                                  </maintMaintP>
                                                  <maintMaintGrp name="
                                                  <fabricNodeBlk name="blk102" from_="102" to_="102">
                                                  </fabricNodeBlk>
                                                  <maintRsMgrpp  tnMaintMaintPName="
                                                  </maintRsMgrpp>
                                                  </maintMaintGrp>
                                                  </fabricInst>
    Note

    If you specify triggered or untriggered values in the downloadSt attribute, these values are ignored.

3.

Post the following policy to trigger the upgrade of all switches immediately:

Example:

POST URL : https://<ip address>/api/node/mo/uni/fabric.xml
                        <maintMaintP
                        name="AllswitchesMaintP" adminSt="triggered">
                        </maintMaintP>

The Cisco APIC s are upgraded serially so that the controller cluster is available during the upgrade.