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

Relax HA Configuration Sync Checks for Panorama Upgrades #83

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ WORKDIR /app
ADD settings.yaml /app

# Install any needed packages specified in requirements.txt
# Note: The requirements.txt should contain pan-os-upgrade==1.2.1
RUN pip install --no-cache-dir pan-os-upgrade==1.2.1
# Note: The requirements.txt should contain pan-os-upgrade==1.2.2
RUN pip install --no-cache-dir pan-os-upgrade==1.2.2

# Set the locale to avoid issues with emoji rendering
ENV LANG C.UTF-8
Expand Down
9 changes: 9 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Welcome to the release notes for the `pan-os-upgrade` tool. This document provides a detailed record of changes, enhancements, and fixes in each version of the tool.

## Version 1.2.2

**Release Date:** *<20240214>*

<!-- trunk-ignore(markdownlint/MD024) -->
### What's New

- Changed the HA config sync check of Panorama appliances to be less strict as a temporary workaround for performing HA upgrades.

## Version 1.2.1

**Release Date:** *<20240214>*
Expand Down
13 changes: 11 additions & 2 deletions pan_os_upgrade/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ def ha_sync_check_firewall(
def ha_sync_check_panorama(
hostname: str,
ha_details: dict,
strict_sync_check: bool = True,
strict_sync_check: bool = False,
) -> bool:
"""
Checks the synchronization status between High Availability (HA) peers of a Palo Alto Networks device.
Expand Down Expand Up @@ -2560,12 +2560,21 @@ def upgrade_panorama(
with target_devices_to_revisit_lock:
is_panorama_to_revisit = panorama in target_devices_to_revisit

# Print out list of Panorama appliances to revisit
logging.debug(
f"{get_emoji('report')} Panorama appliances to revisit: {target_devices_to_revisit}"
)
logging.debug(
f"{get_emoji('report')} {hostname}: Is Panorama to revisit: {is_panorama_to_revisit}"
)

# Perform HA sync check, skipping standalone Panoramas
if ha_details:
ha_sync_check_panorama(
hostname,
ha_details,
strict_sync_check=not is_panorama_to_revisit,
strict_sync_check=False,
# strict_sync_check=not is_panorama_to_revisit,
)

# Back up configuration to local filesystem
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pan-os-upgrade"
version = "1.2.1"
version = "1.2.2"
description = "Python script to automate the upgrade process of PAN-OS firewalls."
authors = ["Calvin Remsburg <cremsburg.dev@gmail.com>"]
documentation = "https://cdot65.github.io/pan-os-upgrade/"
Expand Down
Loading