Skip to content

[backport] #1312: [fix] Invalidate Config checksum after subnet provisioning (to 1.2)#1321

Merged
nemesifier merged 1 commit into
1.2from
backport/1312-to-1.2-1774565802
Mar 27, 2026
Merged

[backport] #1312: [fix] Invalidate Config checksum after subnet provisioning (to 1.2)#1321
nemesifier merged 1 commit into
1.2from
backport/1312-to-1.2-1774565802

Conversation

@openwisp-companion

Copy link
Copy Markdown

Backport of #1312 to 1.2.

Bug:
Previously, the `post_provision_handler` in BaseSubnetDivisionRuleType
did not update the associated Config checksum after subnets or IP
addresses were provisioned. This could lead to inconsistent state where
the Config's checksum and checksum_db diverged, especially when VPN
templates were switched or updated, causing change detection and
dependent logic to fail.

Fix:
- Converted `post_provision_handler` to a classmethod so subclasses can
  extend it safely.
- Invalidate the backend instance cache for the Config.
- Update `checksum_db` if the current checksum differs.
- In VPNSubnetDivisionRuleType, call the superclass handler to ensure
  checksum and cache are updated automatically when a VPN template is
  provisioned.

[backport 1.2]

(cherry picked from commit 76e1527)
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.595% (-0.01%) from 98.608%
when pulling e7daabe on backport/1312-to-1.2-1774565802
into d6a4727 on 1.2.

@nemesifier nemesifier merged commit 981c890 into 1.2 Mar 27, 2026
17 checks passed
@nemesifier nemesifier deleted the backport/1312-to-1.2-1774565802 branch March 27, 2026 21:22
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 this pull request may close these issues.

3 participants