PaloAltoNetworks / PaloAltoNetworks/pan-os-python

PanOS upgrade from 8.0.13 to 8.1.15 fail (SoftwareUpdater(device).upgrade_to_version(version, False))

Open
#243 2 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

Hello, team

Describe the bug

Using "SoftwareUpdater(device).upgrade_to_version(version, False)" to upgrade PanOS from different levels to 8.1.15.
for versions 8.1.x it works, but when trying to upgrade 8.0.x (or earlier) it fails

Expected behavior

expecting function to do consequent upgrades to desired version with installation of base images

Current behavior

Traceback (most recent call last):
File "panos_upgrade.py", line 50, in
SoftwareUpdater(device).upgrade_to_version(version, False)
File "/usr/local/lib/python3.6/site-packages/pandevice/updater.py", line 207, in upgrade_to_version
self.download_install_reboot(next_version, sync=True)
File "/usr/local/lib/python3.6/site-packages/pandevice/updater.py", line 126, in download_install_reboot
self.download_install(version, load_config, sync=True)
File "/usr/local/lib/python3.6/site-packages/pandevice/updater.py", line 118, in download_install
self.download(target_version, sync=True)
File "/usr/local/lib/python3.6/site-packages/pandevice/updater.py", line 64, in download
(self.pandevice.id, version, result['messages']))
pandevice.errors.PanDeviceError: Device xxxxxxx attempt to download version 8.1.15-h3 failed: ['Successfully 'Preloading into software manager', "The required '8.1.0' base image must be loaded before this image can be loadet have to install or run the base image, only download it. Once the base is loaded, re-download your target image to load into software manager. Please retry.', 'Post processing failed. Please retry.']

Possible cause

when upgrading from 8.0.x to 8.1.15 , process excpected as download of 8.1.0 image, download of 8.1.15 image, then install 8.1.15. But according device's log, image 8.1.0 not downloaded, and isntall of 8.1.15 fails because of that.

Steps to reproduce

upgrade from v.8.0.13 to 8.1.15-h3

Your Environment

using hardware model PA-220

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 with pandevice/updater.py, especially upgrade_to_version, download_install_reboot, download_install, and download, then reproduce the 8.0.13 to 8.1.15-h3 upgrade described in the issue. Done means the updater handles the required 8.1.0 base image before installing the requested target image and the upgrade completes without the reported PanDeviceError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.