pan-os-python icon indicating copy to clipboard operation
pan-os-python copied to clipboard

fw_obj.software.upgrade_to_version(targetVersion) loses connection upon reboot and thus doesn't track results or perform subsequent upgrades in a multi-upgrade chain

Open fettigcj opened this issue 2 years ago • 0 comments

Describe the bug

fw_obj.software.upgrade_to_version(targetVersion) loses connection upon reboot and thus doesn't track results or perform subsequent upgrades in a multi-upgrade chain

Expected behavior

Connection loss should be expected during upgrades and connectivity restoration should be possible after reboot.

Current behavior

Connection is lost during reboot

Possible solution

Catch the "pan.xapi.PanXapiError: <serial#> not connected" error and drop into a "while rebooting == True" iteration-counting loop that will only break if waiting exceeds the time limit

Steps to reproduce

Connect to and attempt to upgrade a firewall.

Screenshots

upgrade_disconnects

Context

Upgrading 300 firewalls by Dec 31 due to User ID certificate expiry

Your Environment

Python 3.11.1 pan-os-python 1.8.0

fettigcj avatar Nov 14 '23 03:11 fettigcj