diff --git a/neutron/scheduler/l3_agent_scheduler.py b/neutron/scheduler/l3_agent_scheduler.py index 265d2011ad..8da4ed7d59 100644 --- a/neutron/scheduler/l3_agent_scheduler.py +++ b/neutron/scheduler/l3_agent_scheduler.py @@ -224,9 +224,8 @@ class ChanceScheduler(L3Scheduler): def schedule(self, plugin, context, router_id, candidates=None, hints=None): - with context.session.begin(subtransactions=True): - return self._schedule_router( - plugin, context, router_id, candidates=candidates, hints=hints) + return self._schedule_router( + plugin, context, router_id, candidates=candidates, hints=hints) def _choose_router_agent(self, plugin, context, candidates): return random.choice(candidates) @@ -237,9 +236,8 @@ class LeastRoutersScheduler(L3Scheduler): def schedule(self, plugin, context, router_id, candidates=None, hints=None): - with context.session.begin(subtransactions=True): - return self._schedule_router( - plugin, context, router_id, candidates=candidates, hints=hints) + return self._schedule_router( + plugin, context, router_id, candidates=candidates, hints=hints) def _choose_router_agent(self, plugin, context, candidates): candidate_ids = [candidate['id'] for candidate in candidates]