neutron/neutron/services/segments
Harald Jensas 59520d6006 Add retry decorator update_segment_host_mapping()
When multiple agents register at the same time there is
a possible race condition causing segment host mappings
updates to fail. StaleDataError raised by SQLAlchemy ORM.

Adding retry_if_session_inactive() decorator to the method
fixes the issue.

Also serialize the method with lockutils. It takes 25+
seconds to update segment host mappings for 10 agents with
the retry decorator alone. With the method serialized the
same operation completes in less than 1 second. The retry
decorator is still required for active/active scenarios.

Closes-Bug: #1743579
Change-Id: I616457f094d000a4016c610b454be8269d9b4948
(cherry picked from commit f84781f246)
2018-01-23 19:33:59 +00:00
..
__init__.py Basic Extension and CRUD for Segments 2016-05-05 13:58:34 -06:00
db.py Add retry decorator update_segment_host_mapping() 2018-01-23 19:33:59 +00:00
exceptions.py Enable create and delete segments in ML2 2016-08-28 01:24:56 -04:00
placement_client.py Honor the common session options for the placement API 2017-06-09 15:32:03 +02:00
plugin.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00