Cisco APIC Installation and ACI Upgrade and Downgrade Guide

PDF

Cisco APIC Installation and ACI Upgrade and Downgrade Guide

Upgrade or downgrade with the scheduler

Want to summarize with AI?

Log in

Describes how the scheduler enables you to specify a window of time for operations such as upgrading or downgrading Cisco APIC clusters and switches.


A scheduler is a feature that

  • enables you to specify a window of time for operations such as upgrading or downgrading Cisco APIC clusters and switches

  • can be configured as one-time only or to recur at a specified time and day each week, and

  • provides automated timing control for system maintenance operations.

Scheduler operation for upgrades and downgrades

Note

Starting with ACI 6.2(1) release, schedulers for upgrades or downgrades are not supported.

The scheduler operates differently for Cisco APIC cluster upgrades and switch upgrades:

  • Cisco APIC Cluster Upgrade—There is a default scheduler object for Cisco APIC upgrades. While the generic scheduler object has several properties, only the start time property is configurable for the Cisco APIC cluster upgrade. If you specify a start time, the Cisco APIC upgrade scheduler is active from the specified start time for the duration of 1 day. Anytime during this active one-day window, if runningVersion != desiredVersion for the controllers, the cluster upgrade will begin. None of the other parameters of the scheduler are configurable for Cisco APIC upgrades. Please note that you can also perform an Cisco APIC upgrade by using a one-time trigger, which does not use the scheduler. This one-time trigger is also called upgrade-now.

  • Switch upgrades—A scheduler may be attached to a maintenance group. A scheduler attached to a switch maintenance group has several configurable parameters such as "startTime", "concurCap" and "duration." These parameters are described below:

    • startTime—The start of an active window.

    • concurCap—The number of nodes to upgrade simultaneously.

    • Duration—The length of an active window.

    Anytime during an active window, if runningVersion != desiredVersion for any switch in that group, the switch will be eligible for an upgrade. Among nodes eligible for an upgrade, the following constraints are applied to pick upgrade candidates:

    • No more than the "concurCap" nodes should currently be upgrading.

    • Only one node in a virtual port channel (vPC) pair is upgraded at a time.

    • The Cisco APIC cluster should be healthy before starting a node upgrade.

    Note

    You have the options of immediate upgrade and scheduler-based upgrade through the GUI, CLI or REST API. For example, with CLI, you can upgrade the switch-group immediately using the firmware upgrade switch-group command in the EXEC mode. This command takes priority over any configured scheduled upgrades.

For more information about the scheduler, see the Cisco Application Centric Infrastructure Fundamentals document.


Guidelines for scheduler configuration

The system will react differently if you set an upgrade schedule to a date in the past, depending on whether you are setting a one-time or a recurring upgrade schedule:

  • If you set a one-time upgrade schedule with a date in the past, the configuration will be rejected by the system.

  • If you set a recurring upgrade schedule with a date in the past, the scheduler triggers the upgrade immediately. For example, if it is noon on Wednesday and you set a recurring upgrade schedule for every Tuesday at noon, the scheduler will first trigger an upgrade immediately, and then will perform upgrades every Tuesday at noon from that point forward.


Configure a scheduler using the GUI

The trigger scheduler allows you to define one-time or recurring time periods where one or more nodes can be upgraded and rebooted without administrator intervention.

Beginning with APIC release 5.1, the GUI scheduler option is no longer supported.

Procedure

1.

Access the Create Trigger Scheduler window.

2.

In the Create Trigger Scheduler window, enter a name for the scheduler policy in the Name field, then click + in the Schedule Windows area to bring up the Create Schedule Window window.

3.

In the Window Type field, click either One Time or Recurring , depending on whether you want to configure a one-time or a recurring schedule window.

4.

In the Window Name field, enter a name for this schedule window.

The maximum number of characters for this field is 16.

5.

Determine the date and time that you want the schedule window to occur.

The options for setting the date and time vary, depending on whether you choose to configure a one-time or a recurring schedule window.

  • If you’re configuring a one-time schedule window, in the Date field, enter a date for the one-time schedule window to occur. For this field, use the format YYYY-MM-DD HH:MM:SS AM/PM, or click the down-arrow to select a date and time from a calendar.

    Note

    If you enter a date and time that is in the past (before the current date and time) for the one-time schedule window, the system will reject that entry.

  • If you’re configuring a recurring schedule window, enter the necessary information in the following fields:

    • Day : Select which days that you want the recurring schedule window to occur. Select either a specific day that you want the recurring schedule window to occur every week, or if you want the recurring schedule window to occur every day, on every even day, or on every odd day of the week.

    • Hour : Enter the hour that would like to recurring schedule window to occur, using military 24-hour clock values (0-23).

    • Minute : Enter the minute that would like to recurring schedule window to occur.

    For example, if you wanted to configure a recurring schedule window for every Tuesday at 11:30 p.m., you would make the following selections:

    • Day : Tuesday

    • Hour : 22

    • Minute : 30

Note

If you enter a date and time that is in the past (before the current date and time) for the recurring schedule window, the scheduler triggers the upgrade immediately. For example, if it is noon on Wednesday and you set a recurring upgrade schedule for every Tuesday at 11:30 pm, the scheduler will first trigger an upgrade immediately, and then will perform upgrades every Tuesday at 11:30 pm from that point forward..

6.

In the Maximum Concurrent Nodes field, enter the maximum number of nodes that will be allowed to go through concurrent (simultaneous) upgrades.

If you enter 0 in this field, the software will automatically select the default value, depending on whether the nodes are APIC nodes or leaf or spine switches.

  • For releases prior to release 4.2(5), the default value "0" for this field is interpreted as 1 for APIC nodes and 20 for leaf or spine switches. The maximum number of nodes per POD that you can enter in this field is 200.

  • For release 4.2(5) and forward, the default value "0" for this field is interpreted as 1 for APIC nodes. For leaf or spine switches, the interpretation of the default value "0" for this field has changed from 20 to unlimited. In other words, when entering "0" in this field, the number of leaf or spine switches that can be upgraded at one time is unlimited.

7.

In the Maximum Running Time field, enter the maximum duration for the schedule window, which is the amount of time that you want to allow for the upgrade process to begin.

For this field, use the format DD:HH:MM:SS, with a maximum of 24 hours (01:00:00:00). Enter unlimited if you don’t want to have a time limit enforced on the scheduler window.

For example, assume that you entered the following values in these fields:

  • Maximum Concurrent Nodes : 20

  • Maximum Running Time : 00:00:30:00

In this case, for this schedule window, you’re allowing 20 nodes to upgrade simultaneously, and those 20 nodes will upgrade only if the upgrade process successfully begins within 30 minutes from the start time that you entered in the fields above. If the upgrade process doesn’t begin successfully within 30 minutes, none of the 20 nodes are upgraded at this time, and, if you configured a recurring schedule window, the system will attempt the upgrade for those 20 nodes the next time the scheduler window is set to repeat.

The value that you enter in the Maximum Running Time field doesn’t affect the amount of time that is needed for the switches in a group to upgrade. For example, entering a value of 5 in the Maximum Running Time field only means that the system will abandon the upgrade process for the switches if the upgrades don’t begin after 5 minutes; it doesn’t mean that the system will stop the upgrade process after 5 minutes. Each switch generally takes about 10 minutes for the upgrade.

8.

Click OK when you have finished entering the necessary information in the Create Trigger Scheduler window.

The Create Trigger Scheduler window appears again, with your newly-configured schedule window appearing in the Schedule Windows table.

9.

Determine if you want to create additional schedule windows for this trigger scheduler.

Click + in the Schedule Windows area to bring up the Create Schedule Window window again, if you want to create more schedule windows for this trigger scheduler.

For example, you might create more schedule windows if you want to configure upgrades to start twice a day, say at 12:00 AM and PM every day, or to configure upgrades on specific days of the week.

10.

When you have finished configuring the necessary schedule windows, in the Create Trigger Scheduler window, click Submit .

The Select Node Upgrade window appears again.

11.

In the Select Node Upgrade window, locate the Scheduler field and select the trigger schedule that you just configured.

12.

Complete any necessary additional configurations in the Select Node Upgrade window, then click Submit .


Configure a scheduler using the NX-OS style CLI

A schedule allows operations, such as configuration import/export or tech support collection, to occur during one or more specified windows of time.

A schedule contains a set of time windows (occurrences). These windows can be one time only or can recur at a specified time and day each week. The options defined in the window, such as the duration or the maximum number of tasks to be run, determine when a scheduled task will execute. For example, if a change cannot be deployed during a given maintenance window because the maximum duration or number of tasks has been reached, that deployment is carried over to the next maintenance window.

Each schedule checks periodically to see whether the APIC has entered one or more maintenance windows. If it has, the schedule executes the deployments that are eligible according to the constraints specified in the maintenance policy.

A schedule contains one or more occurrences, which determine the maintenance windows associated with that schedule. An occurrence can be one of the following:

  • Absolute (One Time) Window—An absolute window defines a schedule that will occur only once. This window continues until the maximum duration of the window or the maximum number of tasks that can be run in the window has been reached.

  • Recurring Window—A recurring window defines a repeating schedule. This window continues until the maximum number of tasks or the end of the day specified in the window has been reached.

Procedure

  Command or Action Purpose
1.

configure

Example:

apic1# configure

Enters global configuration mode.

2.

[no] scheduler schedule-name

Example:

apic1(config)# scheduler controller schedule myScheduler

Creates a new scheduler or configures an existing scheduler.

3.

[no] description text

Example:

apic1(config-scheduler)# description 'This is my scheduler'

Adds a description for this scheduler. If the text includes spaces, it must be enclosed in single quotes.

4.

[no] absolute window window-name

Example:

apic1(config-scheduler)# absolute window myAbsoluteWindow

Creates an absolute (one time) window schedule.

5.

[no] max concurrent nodes count

Example:

apic1(config-scheduler-absolute)# max concurrent nodes 300

Sets the maximum number of nodes (tasks) that can be processed concurrently. The range is 0 to 65535. Set to 0 for unlimited nodes.

6.

[no] max running time time

Example:

apic1(config-scheduler-absolute)# max running time 00:01:30:00

Sets the maximum running time for tasks in the format dd:hh:mm:ss. The range is 0 to 65535. Set to 0 for no time limit.

7.

[no] time start time

Example:

apic1(config-scheduler-absolute)# time start 2016:jan:01:12:01

Sets the starting time in the format [[[yyyy:]mmm:]dd:]HH:MM.

8.

exit

Example:

apic1(config-scheduler-absolute)# exit

Returns to scheduler configuration mode.

9.

[no] recurring window window-name

Example:

apic1(config-scheduler)# recurring window myRecurringWindow

Creates a recurring window schedule.

10.

[no] max concurrent nodes count

Example:

apic1(config-scheduler-recurring)# max concurrent nodes 300

Sets the maximum number of nodes (tasks) that can be processed concurrently. The range is 0 to 65535. Set to 0 for unlimited nodes.

11.

[no] max running time time

Example:

apic1(config-scheduler-recurring)# max running time 00:01:30:00

Sets the maximum running time for tasks in the format dd:hh:mm:ss. The range is 0 to 65535. Set to 0 for no time limit.

12.

[no] time start {daily HH:MM | weekly (See usage) HH:MM}

Example:

apic1(config-scheduler-recurring)# time start weekly wednesday 12:30

Sets the period (daily or weekly) and starting time. If weekly is selected, choose from these options:

  • monday

  • tuesday

  • wednesday

  • thursday

  • friday

  • saturday

  • sunday

  • even-day

  • odd-day

  • every-day

Examples

This example shows how to configure a recurring scheduler to run every Wednesday.


        apic1# 
        configure
        apic1(config)# 
        scheduler controller schedule myScheduler
        apic1(config-scheduler)# 
        description 'This is my scheduler'
        apic1(config-scheduler)# 
        recurring window myRecurringWindow
        apic1(config-scheduler-recurring)# 
        max concurrent nodes 300
        apic1(config-scheduler-recurring)# 
        max running time 00:01:30:00
        apic1(config-scheduler-recurring)# 
        time start weekly wednesday 12:30
      

Configure a scheduler using REST API

A schedule allows operations, such as configuration import/export or tech support collection, to occur during one or more specified windows of time.

A schedule contains a set of time windows (occurrences). These windows can be one time only or can recur at a specified time and day each week. The options defined in the window, such as the duration or the maximum number of tasks to be run, determine when a scheduled task will execute. For example, if a change cannot be deployed during a given maintenance window because the maximum duration or number of tasks has been reached, that deployment is carried over to the next maintenance window.

Each schedule checks periodically to see whether the APIC has entered one or more maintenance windows. If it has, the schedule executes the deployments that are eligible according to the constraints specified in the maintenance policy.

A schedule contains one or more occurrences, which determine the maintenance windows associated with that schedule. An occurrence can be one of the following:

  • Absolute (One Time) Window—An absolute window defines a schedule that will occur only once. This window continues until the maximum duration of the window or the maximum number of tasks that can be run in the window has been reached.

  • Recurring Window—A recurring window defines a repeating schedule. This window continues until the maximum number of tasks or the end of the day specified in the window has been reached.

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 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:

Example:

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

Post a policy similar to the following to upgrade all the switches based on a scheduler:

Example:

POST URL : https://<ip address>/api/node/mo/uni/fabric.xml
                        <trigSchedP annotation="" descr="" dn="uni/fabric/schedp-EveryEightHours" name="EveryEightHours" nameAlias="" ownerKey="" ownerTag="" userdom="">
                        <trigRecurrWindowP annotation="" concurCap="unlimited" day="every-day" hour="17" minute="0" name="third" nameAlias="" nodeUpgInterval="0" procBreak="none" procCap="unlimited" timeCap="00:01:00:00.000" userdom=""/>
                        <trigRecurrWindowP annotation="" concurCap="unlimited" day="every-day" hour="9" minute="0" name="second" nameAlias="" nodeUpgInterval="0" procBreak="none" procCap="unlimited" timeCap="00:01:00:00.000" userdom=""/>
                        <trigRecurrWindowP annotation="" concurCap="unlimited" day="every-day" hour="1" minute="0" name="first" nameAlias="" nodeUpgInterval="0" procBreak="none" procCap="unlimited" timeCap="00:01:00:00.000" userdom=""/>
                        </trigSchedP>