]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix request timeout errors during calls to NSX controller
authorarmando-migliaccio <armamig@gmail.com>
Fri, 14 Feb 2014 18:59:17 +0000 (10:59 -0800)
committerarmando-migliaccio <armamig@gmail.com>
Fri, 14 Feb 2014 19:18:06 +0000 (11:18 -0800)
commit85ddbde058d8bda0b938eb7a45ef73519a831b3b
treea3ed96d7ee08f81c82347066479d6d3c8d809d7c
parentb70dce2aab5b1c496786d4258a93f3c7ea3dc267
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
neutron/plugins/nicira/api_client/request.py
neutron/plugins/nicira/api_client/request_eventlet.py