Fix request timeout errors during calls to NSX controller
Sometimes two correlated exception traces are observed in
the server log for the Neutron Server backed by NSX:
RequestTimeout (The nsx request has timed out) and
OperationalError (Lock wait timeout exceeded). This is
generally described by Guru Salvatore Orlando as the,
and I quote, the "infamous eventlet-mysql deadlock".
This patch tries to address the issue by adding a
cooperative yield in the nsx client code (it’s a good idea
to call sleep(0) occasionally in any case) and also by
avoiding the unnecessary spawning of another Greenthread
within a call that is already executed in Greenthred
itself.
Closes-bug: #1267101
Related-bug: #1279497
Change-Id: I8e298468fb730f11a66fbd4211121ee7d3e2a548
(cherry picked from commit 85ddbde058d8bda0b938eb7a45ef73519a831b3b)
Reviewed: https:/ /review. openstack. org/75484 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=c1942623a5a c0be5df83d9511b 56bb6009b64e69
Committed: https:/
Submitter: Jenkins
Branch: stable/havana
commit c1942623a5ac0be 5df83d9511b56bb 6009b64e69
Author: armando-migliaccio <email address hidden>
Date: Fri Feb 14 10:59:17 2014 -0800
Fix request timeout errors during calls to NSX controller
Sometimes two correlated exception traces are observed in Error (Lock wait timeout exceeded). This is
the server log for the Neutron Server backed by NSX:
RequestTimeout (The nsx request has timed out) and
Operational
generally described by Guru Salvatore Orlando as the,
and I quote, the "infamous eventlet-mysql deadlock".
This patch tries to address the issue by adding a
cooperative yield in the nsx client code (it’s a good idea
to call sleep(0) occasionally in any case) and also by
avoiding the unnecessary spawning of another Greenthread
within a call that is already executed in Greenthred
itself.
Closes-bug: #1267101
Related-bug: #1279497
Change-Id: I8e298468fb730f 11a66fbd4211121 ee7d3e2a548 0b938eb7a45ef73 519a831b3b)
(cherry picked from commit 85ddbde058d8bda