| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a strong reference to a non-root table is ephemeral, the database log
can contain inconsistencies. In particular, if the column in question is
the only reference to a row, then the row will be created in one logged
transaction but the reference to it will not be logged (because it is
ephemeral). Thus, any later occurrence of the row later in the log (to
modify it, to delete it, or just to reference it) will yield a transaction
error and reading the database will abort at that point.
This commit fixes the problem by forcing any column with a strong reference
to a non-root table to be persistent.
The change to ovsdb_schema_from_json() looks bigger than it really is: it
just swaps the order of two operations on the schema and updates their
comments. Similarly for the update to ovs.db.DbSchema.__init__().
Bug #5144.
Reported-by: Sujatha Sumanth <ssumanth@nicira.com>
Bug #5149.
Reported-by: Ram Jothikumar <rjothikumar@nicira.com>
|
| |
|
|
|
|
| |
In each of the cases converted here, an shash was used simply to maintain
a set of strings, with the shash_nodes' 'data' values set to NULL. This
commit converts them to use sset instead.
|
| |
|
|
| |
Reported-by: Paul Ingram <paul@nicira.com>
|
| |
|
|
|
|
|
| |
In a parallel make, the install-exec-local target runs concurrently with
the creation of the directory that it installs into. Fix the race by
using the install-exec-hook target instead, which runs subsequently to
directory creation.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Only the time connected (if connected) or disconnected (if disconnected) is
currently reported for each manager. Change to reporting both in seconds since
the last connect and disconnect events respectively. An empty value indicates
no previous connection or disconnection.
This can help diagnose certain connectivity problems, e.g. flapping.
Requested-by: Peter Balland <peter@nicira.com>
Bug #4833.
|
| |
|
|
| |
This could causes unit tests to fail sometimes.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The comment on the n_refs member of struct ovsdb_row says that it does not
count references from a row to itself, but the code didn't implement this
properly. This commit makes the code consistent with the comment.
This does not actually affect any existing OVSDB behavior, because a row's
reference count currently affects only whether it may be deleted, and
references from a row to itself disappear when the row is deleted. But
an upcoming commit will add new uses for a row's reference count, so at
that point it becomes important.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for_each_txn_row() restricts the txn_rows that its callback may delete.
Until now, this has meant that its callback could not delete any rows
that were created within the transaction being processed. These rows have
txn_rows with null 'old' and nonnull 'new', so to delete them requires
either removing the txn_row entirely (forbidden by for_each_txn_row()) or
clearing its 'new' to null. The latter is forbidden because a txn_row
is not allowed to have both 'old' and 'new' null.
Until now, this has not been a significant restriction, because none of
the processing at transaction commit time required deleting arbitrary rows.
Implementing garbage collection, however, does require this ability, so
this commit makes it possible by eliminating the requirement that at least
'old' or 'new' be nonnull.
|
| |
|
|
|
|
| |
The name 'created' better reflects the actual meaning of this member: in
both ovsdb and ovs-vsctl, it is true if a row has been created with the
symbol's UUID and false otherwise.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ovsdb_execute_insert() tried to return a helpful error message when there
was a duplicate uuid-name, but ovsdb_execute() (its caller) makes any
parse error override a parse error. Since ovsdb_execute_insert() would
skip parsing the row when the uuid-name was a duplicate, this meant that
the error actually reported would be that "row" was not allowed here, which
wasn't at all helpful (since "row" is in fact mandatory).
This commit clears up the problem by always retrieving the "row" member,
which required a small amount of refactoring, and adds a test.
|
| |
|
|
|
|
|
|
|
| |
Sometimes internal errors are generated based on an originating error. In
these cases we were just throwing this information away. This commit adds
this information to the internal error report so that the error will be
easier to track down.
I haven't actually seen a situation like this come up.
|
| |
|
|
|
|
|
|
| |
The "uuid-name" that creates symbols must be an <id> but we weren't
verifying the same constraint on the "named-uuid"s that refer to symbols,
which was a bit confusing in writing transactions by hand. This commit
fixes the inconsistency and updates the SPECS file to clarify that a
named-uuid string has to be an <id>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 0b3e7a8b71 (ovsdb-server: Write manager status information to Manager
table.) attempted to provide managers with the ability to debug manager-related
connection problems, but it turns out that reporting "time_in_state" is not
very useful, because the state is constantly changing. What people really want
is the time each manager has been connected or disconnected, depending on the
current connection state.
Replace "time_in_state" key with "time_connected" and "time_disconnected"
keys. Only one exists at a time, and time is in seconds.
Bug #4833.
|
| |
|
|
|
|
| |
The return value isn't interesting here: it will always be 0.
Coverity #10698.
|
| |
|
|
|
|
|
|
| |
ovsdb_txn_commit() may return a ovsdb_error structure, which should be
freed by the caller. The only remaining caller that discards the result
is in ovsdb_file_open__(), which this fixes.
Suggested-by: Ben Pfaff <blp@nicira.com>
|
| |
|
|
| |
Coverity #10726
|
| |
|
|
|
|
|
|
| |
There's no indication that "date" is optional in the description of
ovsdb_file_txn_from_json(), and the one caller always passes it in, so
don't bother checking whether it exists.
Coverity #10732
|
| |
|
|
| |
Coverity #10723
|
| |
|
|
| |
Coverity #11066
|
| |
|
|
|
| |
Reported-by: Peter Balland <peter@nicira.com>
Bug #4698.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This new function saves reading the whole database when only the schema is
of interest. This commit adapts ovsdb-tool to use it for the "db-version"
command. Upcoming commits will introduce another caller.
|
| |
|
|
|
|
|
| |
--format=list corresponds to the output format that "ovs-vsctl list" has
always used.
--bare is easier for scripts to parse.
|
| |
|
|
|
| |
This makes the table formatting functions available to other programs.
ovs-vsctl will start using it soon on the "list" and "find" commands.
|
| |
|
|
|
|
|
|
| |
"warning: 'parse_db_string_column' defined but not used"
This commit fixes the above warning when compiling on systems which
do not have SSL support. It also causes query_db_string() to
always be compiled on these systems as it is not SSL specific and
may be useful in the future.
|
| |
|
|
|
|
|
| |
Otherwise when we add support for saving and restoring configuration
of internal devices around kernel module unload and reload, there's
no easy way for the "restore" code to tell when all the interfaces
should be set up and ready for configuration.
|
| |
|
|
|
|
|
| |
Other modules that accept options use this style and I don't see a reason
for the daemon code to be different. The style used by the daemon code
until now runs the risk of ending up with conflicting values accidentally,
which would be confusing.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the status of manager connections visible via the Manager
table in the database. Two new columns have been created for this purpose:
'is_connected' and 'status'. The former is a boolean flag, and the latter is a
string-string map which may contain the keys "last_error", "state", and
"time_in_state".
Requested-by: Keith Amidon <keith@nicira.com>
Reviewed by: Ben Pfaff.
Feature #3692.
|
| |
|
|
|
|
| |
ovsdb-server tries to read from a column named 'probe_interval' in the Manager
table, but the column is actually named 'inactivity_probe', so a
user-configured probe interval will never be used.
|
| |
|
|
| |
A few generated files have snuck in that should be ignored by git.
|
| |
|
|
|
| |
As the database schema evolves, it might be useful to have an identifier
for the particular version in use. This commit adds that feature.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some versions of "dot" put two spaces after the "node" keyword instead of
one, which didn't match the regular expression used in dot2pic. This
commit changes dot2pic not to care about the number of spaces in "node" and
"graph" lines. (The "graph" lines weren't actually a problem but I don't
see a reason to be picky about them either.)
Different versions of "dot" still produce different output for the same
input, but I don't see how to avoid that.
Reported-by: Justin Pettit <jpettit@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stress options allow developers testing Open vSwitch to trigger behavior
that otherwise would occur only in corner cases. Developers and testers
can thereby more easily discover bugs that would otherwise manifest only
rarely or nondeterministically. Stress options may cause surprising
behavior even when they do not actually reveal bugs, so they should only be
enabled as part of testing Open vSwitch.
This commit implements the framework and adds a few example stress options.
This commit started from code written by Andrew Lambeth.
Suggested-by: Henrik Amren <henrik@nicira.com>
CC: Andrew Lambeth <wal@nicira.com>
|
| |
|
|
|
| |
All pointers (except double stars) should be const-able in
ovsdb-idlc.in generated header files.
|
| |
|
|
|
| |
This commit removes trailing whitespace from the files in the ovsdb
directory.
|
| |
|
|
|
|
|
|
|
|
| |
If "ovs-appctl exit" happens to hit ovsdb-server or ovs-vswitchd at a
moment when nothing else is happening to wake the daemon up, it can take a
long time for them to exit.
This seems to account for occasional "make check" failures on Nicira's
internal builds. It probably fixes some Debian automatic build failures
as well.
|
| |
|
|
|
|
|
|
|
| |
The OVSDB wire protocol has a "monitor" feature that supports table
replication on a column-by-column basis. This wire protocol in theory
supports replicating a table without replicating any columns in it. In
such a case, the client only tracks the UUIDs of the rows in the table.
However, the ovsdb-server implementation did not support this possibility
properly. This commit fixes the bug.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
I'm retaining the "managers" column in the Open_vSwitch table for now, but
I hope that applications transition to using "manager_options" eventually
so that we could drop it.
CC: Andrew Lambeth <wal@nicira.com>
CC: Jeremy Stribling <strib@nicira.com>
|
| |
|
|
|
|
|
|
| |
Recent versions of Graphviz no longer support output to PIC format, so this
commit adds our own internal translator from dot's "plain" output format
to PIC format. The "plain" format works best with slightly different
"dot" input (advised by the Graphviz manual description of the "plain"
format) so this commit also adjusts ovsdb-dot's output.
|
| |
|
|
|
|
|
|
|
|
| |
This check for Graphviz never actually worked properly because Autoconf
swallows up the [] around [gG], so Graphviz was always detected as missing.
This commit fixes the problem by doubling up to [[gG]].
Because Graphviz was never used, I never noticed that ovsdb-dot had not
been revised to use the latest Python interface to OVSDB, so this commit
fixes up those problems too.
|
| |
|
|
|
| |
Requested-by: DK Moon <dkmoon@nicira.com>
CC: DK Moon <dkmoon@nicira.com>
|
| |
|
|
|
|
| |
This refactoring should not change user-visible behavior, but saving the
JSON used to format tables will make it possible to print the raw JSON in
the following commit.
|
| |
|
|
|
| |
It's kind of odd for VLOG_DEFINE_THIS_MODULE to supply its own semicolon,
so this commit switches to the more common form.
|
| |
|
|
|
| |
This feature has been implemented in OVSDB since the beginning, but until
now it was undocumented.
|
| |
|
|
|
|
|
|
| |
The "dump" command printed table names in CSV and HTML output formats but
they were omitted in the default tabular form. This commit corrects the
discrepancy.
Reported-by: Brad Hall <brad@nicira.com>
|
| |
|
|
|
| |
These macros require one fewer argument by switching, which makes code
that uses them shorter and more readable.
|
| | |
|