Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ladmitesh opened this issue Aug 2, 2024 · 0 comments
Open

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

ladmitesh opened this issue Aug 2, 2024 · 0 comments
Labels

Comments

@ladmitesh
Copy link

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

@ladmitesh ladmitesh added the bug label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant