An efficient tool to execute configuration backups, network state snapshots, system readiness checks, and operating system upgrades of Palo Alto Networks firewalls and Panorama appliances.
The perform_upgrade function in the pan-os-upgrade script encounters an error and exits when attempting to install a new PAN-OS version while the software manager is already in use.
Detailed Description
Behavior: When the script tries to upgrade the PAN-OS version using firewall.software.install, it fails if the software manager on the device is currently in use. The script then raises a PanDeviceError and exits.
Error Message:
PanDeviceError: Device [serial] attempt to install version [version] failed: ['Failed to install [version] with the following errors.\nThe software manager is currently in use. Please try again later.\nFailed to install version [version] type panos\n\n']
Expected Behavior: The script should handle this scenario gracefully by retrying the installation after a brief wait period.
Steps to Reproduce
Run the pan-os-upgrade script to upgrade a PAN-OS firewall.
If the software manager on the firewall is busy, observe the script failing with the mentioned error.
Suggested Fix
Improve the error handling in the perform_upgrade function to catch PanDeviceError and implement a retry mechanism. The script should wait for a configurable amount of time and then retry the upgrade process a few times before finally failing.
Impact
This bug impedes the ability of the script to reliably perform upgrades, especially in environments where the software manager might be frequently busy.
Request for Assistance
We are looking for contributions to:
Analyze and confirm the bug.
Propose and implement a solution to handle busy software manager scenarios.
Test the solution in different conditions to ensure reliability.
Issue Summary
The perform_upgrade function in the pan-os-upgrade script encounters an error and exits when attempting to install a new PAN-OS version while the software manager is already in use.
Detailed Description
Behavior: When the script tries to upgrade the PAN-OS version using firewall.software.install, it fails if the software manager on the device is currently in use. The script then raises a PanDeviceError and exits.
Error Message:
Expected Behavior: The script should handle this scenario gracefully by retrying the installation after a brief wait period.
Steps to Reproduce
Run the pan-os-upgrade script to upgrade a PAN-OS firewall. If the software manager on the firewall is busy, observe the script failing with the mentioned error.
Suggested Fix
Improve the error handling in the perform_upgrade function to catch PanDeviceError and implement a retry mechanism. The script should wait for a configurable amount of time and then retry the upgrade process a few times before finally failing.
Impact
This bug impedes the ability of the script to reliably perform upgrades, especially in environments where the software manager might be frequently busy.
Request for Assistance
We are looking for contributions to: