From 12d24abba75ab3b926edbac389437bacc23914dd Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Sun, 5 Feb 2017 17:56:25 -0800 Subject: [PATCH] Delete segments on BEFORE_DELETE instead of PRECOMMIT Deleting segments results in BEFORE/PRECOMMIT/AFTER events itself so it shouldn't performed while already inside a transaction to delete a network. Closes-Bug: #1675910 Change-Id: I6c8070e1dc2216ea909288ce1133321e8eda1daa --- neutron/services/segments/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/services/segments/db.py b/neutron/services/segments/db.py index f09cfe8155d..8e8b303473a 100644 --- a/neutron/services/segments/db.py +++ b/neutron/services/segments/db.py @@ -324,6 +324,6 @@ def subscribe(): resources.SEGMENT, events.PRECOMMIT_CREATE) registry.subscribe(_delete_segments_for_network, resources.NETWORK, - events.PRECOMMIT_DELETE) + events.BEFORE_DELETE) subscribe()