]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix race condition by using lock on enable_radvd
authorsridhargaddam <sridhar.gaddam@enovance.com>
Fri, 19 Jun 2015 16:17:01 +0000 (16:17 +0000)
committersridhargaddam <sridhar.gaddam@enovance.com>
Tue, 21 Jul 2015 17:55:02 +0000 (17:55 +0000)
commit27503dad33bb045ac840f13a3e5fc0a5b603abb1
treef2708e4149ed482767be0790378f3caf6a8e56da
parentd7f8102b75be121f671b98916b3bf3f899002413
Fix race condition by using lock on enable_radvd

For an HA Router, radvd is spawned only in the Master Node.
KeepalivedStateChangeHandler after receiving the state notification
on the unix domain socket, would either enable/disable the radvd
process depending on the state of the HA Router. In parallel, if
there is a request to add an interface to the router, router.process()
would try to enable radvd in parallel. So there is a possible race
condition as two threads try to enable radvd in parallel. This patch
uses appropriate locking mechanism to prevent this race condition.

Closes-Bug: #1466663
Change-Id: I40df78cc57fcde5512336d9dfef88b3b06a69bcb
neutron/agent/l3/ha_router.py