cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
388
Views
0
Helpful
5
Replies

Can RADKit be used for bulk IOS upgrade on switches?

dracmus20
Level 1
Level 1

Hi All,

I have around 100 Cisco 2960X switches that needed to be upgraded. They are currently on 15.2(7)E4 which is not compatible with DNAC SWIM. As an orchestrator would RADKit be able to be used for bulk upgrading large number of switches (100)? The target version is 15.2(7)E10.

Any info on this would be much appreciated. Thanks.

Nurul 

 

5 Replies 5

Rana Khalil
Cisco Employee
Cisco Employee

Hello,

Thanks for reaching out.

To be able to answer this, I would like to understand from you how the upgrade gets triggered and I would like to understand more about the process.

Best Regards,

Rana

Hi Rana,

Thanks for responding.

Please see below for the expected steps:

1. **Check if the Device Needs an Upgrade**
- Use RADKit to query the current IOS version of the switch.
- Compare the current version with the target upgrade version.
- If the device is already on the latest version, log the status and skip further steps for this device.

2. **Verify if the New Version is Already Uploaded**
- Use RADKit to list the files in the switch’s flash memory.
- Check for the presence of the target IOS version file.
- If the file is already present, log the status and proceed to the validation steps.

3. **Ensure Sufficient Space for the New Version**
- Use RADKit commands to check the available flash memory on the switch.
- Calculate the required space for the new IOS image.
- If there is insufficient space, log the status and optionally delete unnecessary files to free up space.

4. **Copy the New IOS Image to Flash Memory**
- Use RADKit’s file transfer capabilities to copy the new IOS image from a central repository to the switch’s flash memory.
- Ensure that the transfer is complete and the file is not corrupted.

5. **Verify the Integrity of the Uploaded File (MD5 Check)**
- Use RADKit to calculate the MD5 checksum of the uploaded IOS image.
- Compare the calculated checksum with the expected MD5 value provided by Cisco.
- If the checksums match, proceed; if not, re-upload the file.

6. **Set the Boot Parameter**
- Use RADKit to set the boot parameters on the switch.
- Configure the switch to use the new IOS image for the next reboot.
- Ensure the boot parameters are correctly set to avoid boot failures.

7. **Check the Boot Path**
- Use RADKit to verify the boot path configuration.
- Ensure that the new IOS image is correctly set as the primary boot image.
- Log any discrepancies and correct them if necessary.

8. **Reload the Switch**
- Initiate a reload of the switch using RADKit.
- Monitor the switch’s status to ensure it goes through the reboot process successfully.

9. **Wait for the Switches to Come Back Up**
- Use RADKit to periodically check the switch’s status during the reboot process.
- Confirm that the switch has fully rebooted and is operational.

10. **Validate the IOS Version**
- After the switch is back up, use RADKit to query the IOS version again.
- Verify that the switch is running the new IOS version.
- Log the successful upgrade and any issues encountered during the process.

Thanks,

Nurul

 

 

Hi Nurul,

Absolutely possible, you can start scripting that and we will support you if you face any issues with the APIs.

Best Regards,

Rana

Rana Khalil
Cisco Employee
Cisco Employee

@dracmus20, steps that are worth mentioning though in your algorithm are:

8. **Reload the Switch**
- Initiate a reload of the switch using RADKit.
- Monitor the switch’s status to ensure it goes through the reboot process successfully.

9. **Wait for the Switches to Come Back Up**
- Use RADKit to periodically check the switch’s status during the reboot process.
- Confirm that the switch has fully rebooted and is operational.

RADKit has no explicit API that checks that but we still have a way to do it which is via DeviceFlow

https://radkit.cisco.com/docs/pages/client_api_sync.html#radkit_client.sync.DeviceFlow

You might wanna check this quick algorithm:

from time import sleep

sleep (x) #number of seconds that the device will typically take to come back online

while(time()-now < x):

flow.exec_wait(" show version") #execute any simple command to check if the device is responding
if len (flow. failed_devices) = 0:  #Keep trying until there are no failed devices

break

flow. failed_devices () #focus on the failed devices until nothing is left

luizsil
Cisco Employee
Cisco Employee

Hello Nuru,

Could you tell me if you are still interested on this topic and still need assistance ?
What is the timeline that you would need something like this ready ?

Best Regards,
Luiz Lalanda Silva