Skip to content

Paloalto firewall upgrade fails with error in upgrade.py #572

@ladmitesh

Description

@ladmitesh

Describe the bug

Below is the script I am using to upgrade from 9.1.16 to 11.1.3 code:


from panos.firewall import Firewall

fw = Firewall("", "Username of PA Firewall ", "<Password of PA Firewall")
fw.software.upgrade_to_version("11.1.3")

Expected behavior

It should not present any error.

Current behavior

Below is the output and error I get after running this script:


(paupgrade) # python3 test-upgrade.py

current ver:9.1.16

target ver:11.1.3

next_minor_version:10.0.0

go to next minor

next_version:10.0.0

current ver:10.0.0

target ver:11.1.3

next_minor_version:10.1.0

not direct, intermediate minor being skipped: 10.0.0 to 11.1.3

direct not possible

next_version:10.1.0

current ver:10.1.0

target ver:11.1.3

next_minor_version:10.2.0

not direct, intermediate minor being skipped: 10.1.0 to 11.1.3

direct not possible

next_version:10.2.0

Traceback (most recent call last):

File "/home/paupgrade/test-upgrade.py", line 4, in

fw.software.upgrade_to_version("11.1.3")

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 400, in upgrade_to_version

result = self.upgrade_to_version(target_version, dryrun=dryrun)

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 400, in upgrade_to_version

result = self.upgrade_to_version(target_version, dryrun=dryrun)

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 398, in upgrade_to_version

self.download_install_reboot(next_version, sync=True)

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 228, in download_install_reboot

self.download_install(version, load_config, sync=True)

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 204, in download_install

self.download(target_version, sync=True)

File "/home/paupgrade/lib/python3.10/site-packages/panos/updater.py", line 97, in download

raise err.PanDeviceError(

panos.errors.PanDeviceError: Device attempt to download version 10.2.0-h3 failed: ['Successfully downloaded', 'Preloading into software manager', "The required '10.2.0' base image must be loaded before this image can be loaded. You do not have to install or run the base image, only download it. Once the base is loaded, re-download your target image.\n", 'Failed to load into software manager. Please retry.', 'Post processing failed. Please retry.']

(paupgrade) #

Possible solution

The updater.py script in python module “pan-os-python” try to download and install 10.2.0-h3 in place of 10.2.0.

Your Environment

python3.10
PA-VM-100 model

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions