yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #83719
[Bug 1888878] Re: Data not present in OVN IDL when requested
Reviewed: https://review.opendev.org/745746
Committed: https://git.openstack.org/cgit/openstack/ovsdbapp/commit/?id=3cf8a427c0a4dfc248e0778c3b1ee65671d1d07b
Submitter: Zuul
Branch: master
commit 3cf8a427c0a4dfc248e0778c3b1ee65671d1d07b
Author: Terry Wilson <twilson@xxxxxxxxxx>
Date: Tue Aug 11 13:12:47 2020 -0500
Add lock when calling idl.run()
python-ovs transparently handles DB reconnections during calls to
Idl.run(). Since ovsdbapp uses a separate thread for the
Connection (so it can handle responding to OVSDB keep-alive echo
requests) and for processing RowEvent notifcations, it is possible
that a thread could be trying to access OVSDB data at the same
time that the Connection thread is updating it. Especially during
a reconnect where the in-memory copy of the DB will be completely
re-written, this causes a problem.
Theoretically, an application that uses ovsdbapp shouldn't access
anything in the backend code directly, but since there is now only
one supported Backend, that restriction has slipped a bit. If
all accesses were in Command objects, mostly there wouldn't be a
problem as they would be handled in the Connection thread. But
with both ReadOnlyCommands and use of lookup() and anything in
idlutils, the main thread can access the in-memory db directly and
potentially cause problems.
The most common problematic method to be called outside of Command
objects is lookup() and ReadOnlyCommands. This patch adds a lock
around calls to idl.run() and lookup() and execute() for the
ReadOnlyCommand case. row_by_value() is another target, but it is
left untouched because it doesn't have access to the API instance
and it is *mostly* called from inside Command objects. User code
that doesn't will be easy to find because user code basically
shouldn't use idlutils.
Change-Id: I98c37771883103e1fb0468de9cf85364071993fa
Closes-Bug: #1888878
** Changed in: ovsdbapp
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1888878
Title:
Data not present in OVN IDL when requested
Status in neutron:
In Progress
Status in ovsdbapp:
Fix Released
Bug description:
During a test execution, we were expecting the NB "NB_Global" table to
have the cfg values. After the test execution (and the error presented
here), "NB_Global" table was consulted via cli command (ovn-nbctl) and
it was correctly populated.
Error: http://paste.openstack.org/show/796293/
Between the reconnection and the command (and the exception), there
are is a time gap of only 36ms. Is it possible that the in-memory DB
was still being populated?
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1888878/+subscriptions