Replace loopingcall in notifier with a delayed send
The loopingcall thread here was started before processes fork and so
the thread stops working after the fork call. This is a problem that
will probably need to be worked out in the long run.
To ensure that this notifier works correctly in all processes, this
change replaces the persistent loopingcall thread with a thread
created on demand to delay and batch up notifications. The first
notification will trigger spawning the thread to wait to send it. Any
notifications that come in the meantime will notice that there is
already a thread waiting to send and will return without spawning.
Conflicts: neutron/notifiers/nova.py
Change-Id: I519d4e89b8cee341c0e1cfffbce3e77151e8202a
Closes-Bug: #1301035
(cherry picked from commit 3be1d7a75c5ec754825e99e0a8d95b4e1521ae4b)
Reviewed: https:/ /review. openstack. org/95509 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=48bc7db994d ea4c296777c6ea9 d65873c03567cd
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 48bc7db994dea4c 296777c6ea9d658 73c03567cd
Author: Carl Baldwin <email address hidden>
Date: Wed Apr 2 16:53:33 2014 +0000
Replace loopingcall in notifier with a delayed send
The loopingcall thread here was started before processes fork and so
the thread stops working after the fork call. This is a problem that
will probably need to be worked out in the long run.
To ensure that this notifier works correctly in all processes, this
change replaces the persistent loopingcall thread with a thread
created on demand to delay and batch up notifications. The first
notification will trigger spawning the thread to wait to send it. Any
notifications that come in the meantime will notice that there is
already a thread waiting to send and will return without spawning.
Conflicts:
neutron/ notifiers/ nova.py
Change-Id: I519d4e89b8cee3 41c0e1cfffbce3e 77151e8202a 4825e99e0a8d95b 4e1521ae4b)
Closes-Bug: #1301035
(cherry picked from commit 3be1d7a75c5ec75