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

Firewall snapshot after upgrade not generated #106

Closed
jpirhon opened this issue Mar 3, 2024 · 4 comments · Fixed by #107
Closed

Firewall snapshot after upgrade not generated #106

jpirhon opened this issue Mar 3, 2024 · 4 comments · Fixed by #107

Comments

@jpirhon
Copy link

jpirhon commented Mar 3, 2024

Describe the bug
Firewall snapshot after upgrade not generated, and therefore the reports are not generated either (standalone firewall). The script returns after "LabFW1: Waiting for the device to become ready for the post upgrade snapshot.". This happens when using settings.yaml file.

I assume that the issue lies in code "upgrade.py" line 716 ->

# Load settings if the file exists
if settings_file_path.exists():

This seems to check if the settings file exists and whether snapshots are enabled or not. In this case when snapshots are enabled it skips the snapshots due to the snapshot and reporting part being included in the else statement (which is never reached due to constuction of the if/else statement).

To Reproduce
Steps to reproduce the behavior:

  1. Generate settings.yaml file
  2. Run the script (using: "pan-os-upgrade firewall")
  3. Post-upgrade snapshot not generated

Expected behavior
Post upgrade snapshots and reports to be generated.

Log output
LabFW1: Upgrade completed successfully
LabFW1: Rebooting the target device.
LabFW1: Retry attempt 1 due to error: URLError: reason: [Errno 110] Connection timed out
LabFW1: Retry attempt 2 due to error: URLError: reason: [Errno 111] Connection refused
LabFW1: Current device version: 11.0.1-h2
LabFW1: Device rebooted to the target version successfully.
LabFW1: Performing backup of configuration to local filesystem.
LabFW1: Waiting for the device to become ready for the post upgrade snapshot.
Script exits here.

Environment

  • Ubuntu 20.04
  • Python 3.11
@cdot65
Copy link
Owner

cdot65 commented Mar 3, 2024

Hello @jpirhon , I believe this was related to this issue that was resolved in the latest release #96

can you confirm your current version?

@jpirhon
Copy link
Author

jpirhon commented Mar 3, 2024

Yes, I'm running the latest:
pan-os-upgrade 1.3.3

@cdot65
Copy link
Owner

cdot65 commented Mar 3, 2024

You are correct, this issue wasn't solved by the previously mentioned Issue, it was in fact created by it. Thanks for the report, I'll work on getting a hotfix out

@cdot65 cdot65 linked a pull request Mar 3, 2024 that will close this issue
6 tasks
@cdot65
Copy link
Owner

cdot65 commented Mar 3, 2024

the fix is in 1.3.4, currently working on a new pytest to catch the issue in the future and will keep the branch open until it's finished.

Thanks again for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants