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

87 inconsistent ha peer upgrade order due to thread limitations #88

Merged

Conversation

cdot65
Copy link
Owner

@cdot65 cdot65 commented Feb 15, 2024

Summary

This PR introduces modifications to the firewall upgrade process, specifically targeting the handling of High Availability (HA) synchronization checks. Previously, strict HA synchronization checks could potentially halt the upgrade process if HA peers were not perfectly synchronized, especially in scenarios where the number of targeted firewalls exceeded the available thread count. This change aims to enhance the flexibility and resilience of the upgrade process by relaxing the HA synchronization requirements.

Changes Made

HA Synchronization Check Adjustment: The default behavior of the ha_sync_check_firewall function has been updated to not enforce strict HA synchronization (strict_sync_check: bool = False). This adjustment allows the upgrade process to proceed even in cases where HA synchronization might not be perfect, accommodating the asynchronous nature of multi-threaded operations.

Simplified HA Sync Check Execution: The execution of the ha_sync_check_firewall function within the upgrade_firewall function has been simplified by removing the conditional strict_sync_check argument. The function now operates under the assumption that strict sync checks are not required by default, thus streamlining the logic and reducing complexity.

Removed Redundant Code: Code segments that determined the necessity of strict HA sync checks based on the revisit status of devices (is_device_to_revisit) have been removed. This elimination reflects the shift towards a more lenient approach to HA sync checks, rendering such checks unnecessary.

Implications

  • Operational Flexibility: By allowing upgrades to proceed without strict HA sync, the upgrade process becomes more adaptable to the dynamic conditions of HA environments, reducing the likelihood of upgrade interruptions.
  • Risk Consideration: While this change improves operational flexibility, it also introduces a need for careful monitoring of HA status post-upgrade. Administrators should be vigilant in identifying and resolving any HA synchronization discrepancies that may arise due to relaxed checks.

Testing

Extensive testing in both standalone and HA-configured environments is recommended to ensure that the relaxed synchronization checks do not introduce unexpected behaviors or instability.

Monitoring tools and procedures should be in place to quickly identify and address any HA sync issues following upgrades.

Conclusion

This PR represents a strategic shift towards a more resilient and adaptable upgrade process for Palo Alto Networks firewalls.

By accommodating the complexities of HA environments and the limitations of multi-threaded operations, it aims to provide a smoother and more reliable upgrade experience.

@cdot65 cdot65 added the bug Something isn't working label Feb 15, 2024
@cdot65 cdot65 self-assigned this Feb 15, 2024
@cdot65 cdot65 linked an issue Feb 15, 2024 that may be closed by this pull request
@cdot65 cdot65 merged commit 998e1d6 into main Feb 15, 2024
1 check passed
@cdot65 cdot65 deleted the 87-inconsistent-ha-peer-upgrade-order-due-to-thread-limitations branch February 15, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent HA Peer Upgrade Order Due to Thread Limitations
1 participant