-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect netbox/arp rule deletion
43d5543 deleted the incorrect database rule and made it into a release. This reinstates the rule, ensures data integrity and deletes the *correct* rule: `netbox_status_close_arp`
- Loading branch information
1 parent
4797ef5
commit 9d1eb2d
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Replace incorrect fix for premature ARP record closure introduced in 5.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Reinstate rule that closes ARP records on netbox deletion, see #2910 | ||
CREATE OR REPLACE RULE netbox_close_arp AS ON DELETE TO netbox | ||
DO UPDATE arp SET end_time=NOW() | ||
WHERE netboxid=OLD.netboxid AND end_time='infinity'; | ||
|
||
-- Close all open ARP records that have no associated netbox (those that may have been kept open in error due to | ||
-- deletions between 5.10.1 and 5.10.2) | ||
UPDATE arp SET end_time=NOW() | ||
WHERE end_time>='infinity' AND netboxid IS NULL; | ||
|
||
-- Remove actually malfunctioning ARP record closing rule, see #2910 | ||
DROP RULE IF EXISTS netbox_status_close_arp ON netbox; |