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
(cherry picked from commit 27503dad33bb045ac840f13a3e5fc0a5b603abb1)
Reviewed: https:/ /review. openstack. org/205373 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=1a1cc3d44b1 bcebb06b403838b 670238ec584ca3
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 1a1cc3d44b1bceb b06b403838b6702 38ec584ca3
Author: sridhargaddam <email address hidden>
Date: Fri Jun 19 16:17:01 2015 +0000
Fix race condition by using lock on enable_radvd
For an HA Router, radvd is spawned only in the Master Node. tateChangeHandl er after receiving the state notification
KeepalivedS
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 5512336d9dfef88 b3b06a69bcb ac840f13a3e5fc0 a5b603abb1)
Change-Id: I40df78cc57fcde
(cherry picked from commit 27503dad33bb045