PaloAltoNetworks / PaloAltoNetworks/pan-os-python

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
#533 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
400
Forks
199
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing fw_obj.software.upgrade_to_version(targetVersion) and reproduce an upgrade on a firewall using the reported Python 3.11.1 and pan-os-python 1.8.0 environment. Inspect how the pan.xapi.PanXapiError connection loss is handled during reboot and verify that connectivity is restored, results are tracked, and subsequent upgrades in a multi-upgrade chain run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.