aboutsummaryrefslogtreecommitdiff
path: root/ovsdb
AgeCommit message (Collapse)Author
2012-03-19ovsdb-doc: Use minus sign in negative numbers in nroff output.Ben Pfaff
ovs-vswitchd.conf.db.5 has autogenerated text "at least -1" in one place. This '-' should be a minus sign, but ovsdb-doc was generating it as a hyphen. Found by lintian. Reported-by: Thomas Goirand <zigo@debian.org> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19ovsdb-doc: Convert '-' preceding a number as a minus sign, not a hyphen.Ben Pfaff
ovs-vswitchd.conf.db.5 contains the following sentence: If the interface cannot be added then Open vSwitch sets this column to -1. The '-' in "-1" should be a minus sign, not a hyphen, but the heuristic in ovsdb-doc wasn't smart enough. This commit improves the heuristic and fixes the problem. Found by lintian. Reported-by: Thomas Goirand <zigo@debian.org> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19ovsdb-doc: Put NAME section into generated manpage.Ben Pfaff
This makes the manpage indexable by standard system tools. Found by lintian. Reported-by: Thomas Goirand <zigo@debian.org> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09man: fix pic issue at the sourceChris Wright
The commit 0993b66 (man: pic failed to run during manpage-check) worked around the manpage-check warning generated by groff. Using "-T ascii" rather "-T utf8" was enough to silence the warning because the man page has this condition in it: .if !'\*[.T]'ascii' However, rpmlint generates the same warning as manpage-check was (it uses -Tutf8), and manpages are generated using -Tutf8 (leading to an fairly unreadable drawing). So let's change the logic a bit and allow pdf generation w/ nice drawing and kill it for tty's. Cc: Ethan Jackson <ethan@nicira.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-11-28ovsdb: Correctly implement conditions that include multiple clauses.Ben Pfaff
Multiple-clause conditions in OVSDB operations with "where" clauses are supposed to be conjunctions, that is, the condition is true only if every clause is true. In fact, the implementation only checked a single clause (not necessarily the first one) and ignored the rest. This fixes the problem and adds test coverage for multiple-clause conditions. Reported-by: Shih-Hao Li <shli@nicira.com>
2011-10-26Implement automatic dependency generation for manpages.Ben Pfaff
This ensures that manpages actually get rebuilt if any of the lib/*.man fragments that they depend upon are modified.
2011-10-24ovsdb-tool: Make "show-log" convert raw JSON to easier-to-read syntax.Ben Pfaff
Now output that formerly looked like ["map", [["key1", "value1"], ["key2", "value2"]]] is printed like {key1=value1, key2=value2}, which I find easier to read.
2011-10-24ovsdb-tool: Add abbreviated UUIDs to "show-log" even when we have a name.Ben Pfaff
The "show-log" command tries to give names to the rows to make it easier to understand what's going on, but it's still important to see at least partial UUIDs so that one can search the output for references to the rows by UUID.
2011-10-18ovsdb: Remove dead Python-related code.Ben Pfaff
Initial versions of commit 8cdf034974 "python: Implement write support in Python IDL for OVSDB" converted the OVSDB schemas to Python code so that their Python clients could just import them. The final version instead read the schemas from a file, but I forgot to remove some code that generated the Python schema modules. This commit removes that code. Reported-by: Ethan Jackson <ethan@nicira.com>
2011-10-12vswitchd: Document constraints on keys.Ben Pfaff
Suggested-by: Justin Pettit <jpettit@nicira.com>
2011-10-04vswitchd: Document map members as separate columnsBen Pfaff
The OVS configuration database now has numerous columns that contain fixed key-value pairs. Currently there's no way to see these at a glance, because they are not presented in the summary tables just before the detailed descriptions. This commit extends the XML format so that keys within a column can be described individually, and rearranges and rewrites vswitch.xml to take advantage of this feature.
2011-09-29ovs-appctl: Print command arguments for "help".Justin Pettit
2011-09-23python: Implement write support in Python IDL for OVSDB.Ben Pfaff
Until now, the Python bindings for OVSDB have not supported writing to the database. Instead, writes had to be done with "ovs-vsctl" subprocesses. This commit adds write support and brings the Python bindings in line with the C bindings. This commit deletes the Python-specific IDL tests in favor of using the same tests as the C version of the IDL, which now pass with both implementations. This commit updates the two users of the Python IDL to use the new write support. I tested this updates only by writing unit tests for them, which appear in upcoming commits.
2011-09-23ovs.db.types: Add table reference to ovs.db.types.BaseType.Ben Pfaff
Until now ovs.db.types.BaseType has kept track of the name of the referenced table but not a reference to it. This commit renames the ref_table attribute to ref_table_name and adds a new ref_table attribute whose value is a reference to the named table. This will be useful in an upcoming commit where table references are actually followed.
2011-09-22ovsdb-tool: Correct markup for 'db' argument in show-log description.Justin Pettit
2011-09-15Mark "uninstall-local" targets phony.Ben Pfaff
2011-08-24docs: Add Makefile rule to check syntax of manpages.Ben Pfaff
This should catch future nroff syntax errors immediately, instead of much later.
2011-08-24docs: Fix some manpage syntax errors found with "groff".Ben Pfaff
2011-08-08ovsdb: Correct specification inconsistency between "lock" and "assert".Ben Pfaff
The "lock" request requires the lock name to be an <id> but it is shown as <string> in the "assert" operation. This corrects the "assert" specification and fixes the suggested naming convention (since ":" is not valid in an <id>). This commit also updates the implementation to match the specification. Reported-by: Jeremy Stribling <strib@nicira.com>
2011-08-05ovsdb: Fix typo in SPECS.Ben Pfaff
Reported-by: Jeremy Stribling <strib@nicira.com>
2011-08-04util: Introduce get_program_version function.Justin Pettit
Useful in an upcoming commit.
2011-07-26ovsdb: Implement a "lock" feature in the database protocol.Ben Pfaff
This provides clients a way to coordinate their access to the database. This is a voluntary, not mandatory, locking protocols, that is, clients are not prevented from modifying the database unless they cooperate with the locking protocol. It is also not related to any of the ACID properties of database transactions. It is strictly a way for clients to coordinate among themselves. The following commit will introduce one user.
2011-07-26ovsdb: Refactor jsonrpc-server to make the concept of a session public.Ben Pfaff
An upcoming commit will need to expose the concept of a database session to the execution engine, to allow the execution engine to query the locks held by the session. This commit prepares for that by making sessions a publicly visible data structure.
2011-07-26ovsdb: Report the number of connections for inbound Managers.Ben Pfaff
Inbound managers (e.g. "ptcp:") can have multiple active connections, but the database schema doesn't allow us to report the status of more than one at a time. This commit adds a status key-value pair that, when there is more than one active connection, reports the number that are active. This at least helps to clarify the issue.
2011-07-26ovsdb-server: Reliably report status of inbound connections.Ben Pfaff
ovsdb_jsonrpc_server keeps track of its remotes in a shash indexed on the remote name specified in the database Manager record, but ovsdb_jsonrpc_server_get_remote_status() added the name returned by jsonrpc_session_get_name() to the shash returned to the ovsdb-server code. If that name happened to be different (which is entirely possible because the latter returns a "canonicalized" name in some cases) then the ovsdb-server code couldn't find it. Furthermore, if an inbound (e.g. "ptcp:") Manager got a connection and then lost it, the status info in that Manager never got updated to reflect that, because the code considered that that "couldn't happen" and didn't bother to do any updates. This commit simplifies the logic. Now ovsdb-server just asks for a single status record at a time, using the name that is indexed in the ovsdb_jsonrpc_server shash, avoiding that whole issue.
2011-07-26ovsdb-client: Make "server" and "database" arguments optional.Ben Pfaff
In practice these arguments are almost always the defaults, so this change makes ovsdb-client much more usable interactively.
2011-07-26ovsdb-server: Make database command-line argument optional.Ben Pfaff
In practice the default location is the only one used, so we might as well make it easier.
2011-07-26ovsdb-doc: Fix definition of .TQ macro.Ben Pfaff
.TP's argument is an optional indentation width, not a string. The string goes on the next line. vswitch.xml didn't actually cause .TQ to be used before, so this wasn't a problem, but an upcoming commit does add a use, so this commit fixes the problem in advance.
2011-07-18ovsdb: Log when remote connections are deconfigured.Ben Pfaff
Recently I helped debug a scenario where ovsdb-server connected to a remote manager, then ovs-vsctl deleted the remote manager and soon after re-added it. The log was difficult to interpret because it showed two successful connection attempts to the same remote without showing a reason why the connection was dropped in the first place. Adding this log message would make it clear that the configuration changed to remove that remote connection in the meantime.
2011-07-08ovsdb: Remove useless "return;" in ovsdb_jsonrpc_session_get_status().Ben Pfaff
2011-07-07ovsdb-tool: Put version number in comment when compacting or converting.Ben Pfaff
Adding the version number can make it clear what version of OVS screwed something up as part of an upgrade or downgrade.
2011-07-06ovsdb: Fix segfault in ovsdb_file_txn_row_from_json().Ben Pfaff
If 'error' is nonnull then we destroy the row, so we must not try to reuse the row immediately after that. Support request #6155. Repoted-by: Geoff White <gwhite@nicira.com>
2011-06-24ovsdb: Synchronize comments and code in ovsdb_file_commit().Ben Pfaff
The comments and the code didn't match, so make them agree.
2011-06-22ovsdb: Fix memory leak in transaction.Ben Pfaff
2011-06-21ovsdb-doc: Add support for references to specific keys.Ben Pfaff
Now a specific key can be referenced with syntax like <ref table="Bridge" column="other-config" key="datapath-id"/>. Also fixes up an existing place that needed this feature already (and had a typo, too).
2011-06-06ovsdb: Better document possible commit-time error results.Ben Pfaff
CC: Jeremy Stribling <strib@nicira.com>
2011-06-06ovsdb: Implement table uniqueness constraints ("indexes").Ben Pfaff
2011-06-06ovsdb: Add functions for formatting column sets and data in columns sets.Ben Pfaff
These will be used for formatting error messages in an upcoming commit.
2011-06-06ovsdb: Move ovsdb_table_put_row() into test program.Ben Pfaff
This function is not useful inside ovsdb itself but only in the "test-ovsdb" test program. To avoid the temptation to use it incorrectly inside ovsdb, this commit moves it into the test program.
2011-06-06ovsdb: Make ovsdb_column_set_from_json() take table schema instead of table.Ben Pfaff
This function took a struct ovsdb_table but only used the 'schema' member. An upcoming patch needs to parse a column set when only the schema is available, so to prepare for that this patch changes ovsdb_column_set_from_json() to only take the schema that it really needs.
2011-05-31ovsdb: Check ovsdb_mutation_set_execute() return value in transactions.Ben Pfaff
Errors from this function were being ignored, which meant that transactions could use "mutate" to bypass number-of-elements constraints on sets and maps. This fixes the problem and adds a test to prevent the problem from recurring. Bug #5781.
2011-05-31ovsdb: Fix spelling of "constraint violation" in error tag.Ben Pfaff
2011-05-26ovsdb-doc: Omit E-R diagram from ASCII version of manpage.Ben Pfaff
The E-R diagram is illegible when rendered in ASCII, so exclude it from that version only. The E-R diagram is still included in other versions of the manpage (e.g. for PostScript output).
2011-05-24ovsdb: Annotate E-R diagram with number of allowed values.Ben Pfaff
This makes the diagram even more informative.
2011-05-23ovsdbmonitor: Add brief manpage.Ben Pfaff
2011-05-23ovsdbmonitor: Update to work with recent ovs-dpctl output.Ben Pfaff
The format of "ovs-dpctl dump-flows" has completely changed since ovsdbmonitor was written. It seems like no one has tried out ovsdbmonitor since the rewrite, because it didn't work at all. This commit fixes the parser.
2011-05-23ovsdbmonitor: Use ovs.json module instead of JsonReader and JsonWriter.Ben Pfaff
I can't figure out where JsonReader and JsonWriter come from. I know that they must exist, because I (and others) have used ovsdbmonitor before, but I can't find them now. Switch to using ovs.json, which is part of Open vSwitch so we know that it exists. At the same time, we have to start translating the Unicode strings that ovs.json outputs into standard Python strings; otherwise the "twisted conch" ssh implementation craps out because it tries to concatenate this Unicode string with a standard string that contains non-ASCII characters.
2011-05-23docs: Suppress "warning: macro `DD' not defined" warnings from man.Ben Pfaff
deamon.man allows the file that is including it to include extra text in the description of --detach by defining a macro named DD. Only some of the manpages that included it did this (only those manpages that needed extra text there). But it's better to be quiet in "man --warnings", so this defines DD to an empty value in the other manpages that include daemon.man. Reported by lintian.
2011-05-23Avoid sparse error or warning for sizeof(_Bool).Ben Pfaff
The sparse checker does not like taking sizeof(_Bool). Older versions of sparse output a hard error ("error: cannot size expression"). Newer versions output a warning ("warning: expression using sizeof bool"). This commit avoids the problem by not using sizeof(_Bool) anywhere. The only place where OVS uses sizeof(_Bool) anyway is in code generated by the OVSDB IDL. It generates it for populating "optional bool" columns in the database, that is, columns that are allowed to contain 0 or 1 instances of a bool. For these columns, it generates code that looks roughly like this: row->column = xmalloc(sizeof *row->column); *row->column = value; This commit changes these columns from type "bool *" to type "const bool *" and changes the generated code to: static const bool true_value = true; static const bool false_value = false; row->column = value ? &true_value : &false_value; which avoids the problem and saves a malloc() call at the same time. The idltest code had a column with a slightly different type ("0, 1, or 2 bools") that didn't fit the revised pattern and is a fairly stupid type anyhow, so I just changed it to "0 or 1 bools".
2011-05-16Consistently write null pointer constants as NULL instead of 0.Ben Pfaff
Found with sparse.