summaryrefslogtreecommitdiff
path: root/ovsdb
Commit message (Collapse)AuthorAgeFilesLines
* ovsdb: Fix dead assignment reported by clang.William Tu2016-07-021-2/+2
| | | | | | | | Clang reports variable 'error' never been used. Fix by returning error when table_update->type != JSON_OBJECT. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix ovsdb-server replication blocking bug.Mario Cabrera2016-06-281-2/+1
| | | | | | | | With this patch ovsdb-server no longer blocks waiting for the remote server connection when doing replication. Signed-off-by: Mario Cabrera <mario.cabrera@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* util: New function nullable_xstrdup().Ben Pfaff2016-06-261-1/+1
| | | | | | It's a pretty common pattern so create a function for it. Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Add table exclusion functionality to OVSDB replicationMario Cabrera2016-06-243-3/+53
| | | | | | | | | | | | | A blacklist of tables that will be excluded from replication can be specified by the following option: --sync-exclude-tables=db:table[,db:table]… Where 'table' corresponds to a table name, and 'db' corresponds to the database name where the table resides. Signed-off-by: Mario Cabrera <mario.cabrera@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Introduce OVSDB replication featureMario Cabrera2016-06-247-27/+674
| | | | | | | | | | | | | | Replication is enabled by using the following option when starting the database server: --sync-from=server Where 'server' can take any form described in the ovsdb-client(1) manpage as an active connection. If this option is specified, the replication process is immediately started. Signed-off-by: Mario Cabrera <mario.cabrera@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-controller: Use new ovsdb-idl helpers to make logic more readable.Ben Pfaff2016-06-231-0/+12
| | | | | | | | Also there were lots of 'continue's sprinkled around that didn't seem to be needed given some simple code rearrangement. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovsdb: Strong references cascade performance fix.Rodriguez Betancourt, Esteban2016-06-231-9/+11
| | | | | | | | | | | | | | | | | | | | | | Improves the performance of OVSDB avoiding the chain reaction produced when modifing rows with a strong reference and the pointed rows have more strong references. The approach taken was using the change bitmap to avoid triggering a change count when the column hasn't changed. One way to trigger the issue is emulating a simple linked list with strong references within a table, where each new row points to the previous. Without the fix OVSDB creates a ovsdb_txn_row (and a copy of the row) for each row in the table. With the fix it only creates two ovsdb_txn_row: the new row and the directly pointed row. Signed-off-by: Esteban Rodriguez Betancourt <estebarb@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* debian, rhel: Ship ovs shared libraries and header filesEdwin Chiu2016-06-071-1/+1
| | | | | | | | | | Compile and package ovs shared libraries and create new header package for debian (openvswitch-dev) and rhel (openvswitch-devel). VMware-BZ: #1556299 Signed-off-by: Edwin Chiu <echiu@vmware.com> Co-authored-by: Harold Lim <haroldl@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-idlc.in: Autogenerate partial map updates functions.Edward Aymerich2016-05-181-0/+69
| | | | | | | | | | | Code inserted that autogenerates corresponding map functions to set and delete elements in map columns. Inserts description to the functions that are autogenerated. Signed-off-by: Edward Aymerich <edward.aymerich@hpe.com> Signed-off-by: Arnoldo Lutz <arnoldo.lutz.guevara@hpe.com> Co-authored-by: Arnoldo Lutz <arnoldo.lutz.guevara@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: Fix memory leak reported by Valgind.William Tu2016-05-141-0/+1
| | | | | | | | | | | Reported by test 1657: ovsdb-server/add-db and remove-db. ds_put_format (dynamic-string.c:142) query_db_remotes (ovsdb-server.c:798) reconfigure_remotes (ovsdb-server.c:988) main_loop (ovsdb-server.c:156) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* hmap: Add HMAP_FOR_EACH_POP.Daniele Di Proietto2016-04-262-6/+4
| | | | | | | Makes popping each member of the hmap a bit easier. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Force columns that contain weak references to be immutable.Ben Pfaff2016-04-112-9/+21
| | | | | | | | | | An immutable weak reference is a hole in the constraint system: if referenced rows are deleted, then the weak reference needs to change. Therefore, force columsn that contain weak references to be mutable. Reported-by: "Elluru, Krishna Mohan" <elluru.kri.mohan@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovsdb: Use previous snapshot size as an additional factor for compaction.Ben Pfaff2016-03-312-9/+31
| | | | | | | | | | | | | | Until now, the minimum database size before automatically compacting has been 10 MB, regardless of the inherent size of the data in the database. A couple of people have pointed out that this won't scale well to larger databases. This commit changes this criterion to 4 times the previously compacted size of the database, with 10 MB as a minimum. The 4x factor is suggested by Diego Ongaro's thesis, "Consensus: Bridging Theory and Practice", section 5.1.2 "When to snapshot". Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* ovsdb: Improve error message from ovsdb_log_open() open failure.Ben Pfaff2016-03-301-1/+1
| | | | | | | | | | | Previously, error messages ended up looking like: ovsdb-tool: I/O error: create: $DBFILE failed (File exists) which is hard to understand. This commit changes them to: ovsdb-tool: I/O error: $DBFILE: create failed (File exists) which makes more sense. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* list: Rename all functions in list.h with ovs_ prefix.Ben Warren2016-03-307-49/+49
| | | | | | | This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Remove lib/list.h completely.Ben Warren2016-03-306-6/+6
| | | | | | | | All code is now in include/openvswitch/list.h. Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Remove unused "struct ovsdb_log_read_cbdata".Ben Pfaff2016-03-281-7/+0
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* Move lib/dynamic-string.h to include/openvswitch directoryBen Warren2016-03-198-8/+8
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: Add Json cache count to memory/showAndy Zhou2016-03-101-0/+5
| | | | | | | | Add the size of json cache to the data reported by ovsdb-server appctl "memory/show" command. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: Fix a reference count leak bugandy zhou2016-03-083-7/+12
| | | | | | | | | | | | | | | | | | | | | When destroying an ovsdb_jsonrpc_monitor, the jsonrpc monitor still holds a reference count to the monitors 'changes' indexed with 'unflushed' transaction id. The bug is that the reference count was not decremented as it should in the code path. The bug caused 'changes' that have been flushed to all jsonrpc clients to linger around unnecessarily, occupying increasingly large amount of memory. See "Reported-at" URL for more details. This bug is tricky to find since the memory is not leaked; they will eventually be freed when monitors are destroyed. Reported-by: Lei Huang <huang.f.lei@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-March/067274.html Signed-off-by: Andy Zhou <azhou@ovn.org> Tested-by: Han Zhou <zhouhan@gmail.com> Acked-by: Han Zhou <zhouhan@gmail.com> Acked-by: Liran Schour <lirans@il.ibm.com>
* ovsdb-server: Refactoring and clean up remote status reporting.Andy Zhou2016-02-281-17/+41
| | | | | | | | | | | | When reporting remote status, A listening remote will randomly pick a session and report its session status. This does not seem to make much sense. It is probably better to leave those fields untouched. Update ovs-vswitchd.conf.db(5) to match the change in implementation. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: avoid unnecessary call to ovsdb_monitor_get_update()Andy Zhou2016-02-241-0/+4
| | | | | | | | | | | | Optimizing ovsdb_jsonrpc_mintor_flush_all() by avoiding calling ovsdb_monitor_get_update() on monitors that do not have any unflushed updates. This change saves CPU cycles on ovsdb-server's main loop, but should not introduce any client visible changes. Reported-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Liran Schour <lirans@il.ibm.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: rename variables in ovsdb_monitor_get_update()Andy Zhou2016-02-241-10/+10
| | | | | | | | | 'prev_txn' and 'next_txn" are more confusing than 'unflushed' and 'unflushed_next'. Rename them. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Liran Schour <lirans@il.ibm.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix one off error in tracking monitor changesAndy Zhou2016-02-241-2/+15
| | | | | | | | | | | | | | | | | | dbmon's changes should be stored with the next transaction number, rather than the current transaction number. This bug causes the changes of a transaction stored in a monitor to be unnoticed by the jsonrpc connections that is responsible for flush the monitor content. However, the bug was not noticed until it was exposed by a later optimization patch: "avoid unnecessary call to ovsdb_monitor_get_update()." The lack of optimization means that the update is still generated when 'unflushed' equals to n_transactions + 1, which should have indicated the monitor has been flushed already. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Liran Schour <lirans@il.ibm.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: Eliminating max session limitandy zhou2016-02-101-21/+14
| | | | | | | | | | | | | | | This patch removes limits on number of concurrent sessions allowed by ovsdb-server. Historically, it was not an design goal for OVSDB server to support very high number of sessions. The imposed limit reflects those design choices. Work is now underway to improve OVSDB scalability since supporting large of number of sessions is important for OVN, Removing this limit makes scalability testing possible. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Han Zhou <zhouhan@gmail.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Fix memory leak reported by valgind.William Tu2016-02-101-0/+1
| | | | | | | | | Testcase 1429: ovsdb-server/add-db and remove-db. xmemdup0 (util.c:142) main (ovsdb-client.c:133) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix typo in libovsdb's pkg-config.Ansari, Shad2016-02-051-1/+1
| | | | | | | | Fix typo in the library name of pkg-config of libovsdb. Reported-by: Javier Albornz <javier.albornoz@hpe.com> Signed-off-by: Shad Ansari <shad.ansari@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: fix monitor counters reported by memory/showAndy Zhou2016-02-054-1/+12
| | | | | | | | | | | | | | Commit 4c2809787cdbc774 (ovsdb-monitor: add json cache) introduced an optimization that allows jsonrpc session to share monitors. However, the memory/show implementation was not updated to match the implementation; it still assumes that each jsonrpc session uses its own monitor, thus are likely to over reporting the number. This patch fix the bug and reports the actual number of monitor used by the ovsdb-server. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-idl: Add support for column tracking in IDL.Shad Ansari2016-01-121-4/+11
| | | | | | | | | | Recent IDL change tracking patches allow quick traversal of changed rows. This patch adds additional support to track changed columns. It allows an IDL client to efficiently check if a specific column of a row was updated by IDL. Signed-off-by: Shad Ansari <shad.ansar@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Fix memory leak reported by valgrind.William Tu2016-01-111-0/+3
| | | | | | | | | | | | | | | | testc ase 1427: ovsdb-server combines updates on backlogged connections. valgrind reports two leaks: unixctl_server_create (unixctl.c:250) do_monitor__ (ovsdb-client.c:918) and json_create (json.c:1406) json_integer_create (json.c:262) json_clone (json.c:413) do_monitor__ (ovsdb-client.c:958) Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Andy Zhou <azhou@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Fix memory leak reported by valgrind.William Tu2016-01-111-0/+14
| | | | | | | | | | | | | | test case 1427: ovsdb-server combines updates on backlogged connections. ovsdb_column_set_add (column.c:233) add_column (ovsdb-client.c:730) parse_monitor_columns (ovsdb-client.c:787) add_monitored_table (ovsdb-client.c:872) do_monitor__ (ovsdb-client.c:945) Reported-by: William Tu <u9012063@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-January/064161.html Signed-off-by: Andy Zhou <azhou@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Fix memory leak reported by valgrind.William Tu2016-01-111-0/+1
| | | | | | | | | | | | | | | Test case 1508-1514: OVSDB -- ovsdb-server monitors, call stacks: ovsdb_schema_create (ovsdb.c:34) ovsdb_schema_from_json (ovsdb.c:196) fetch_schema (ovsdb-client.c:375) do_monitor__ (ovsdb-client.c:920) main (ovsdb-client.c:152) Fix by adding ovsdb_schema_destroy(). Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Fix memory leak reported by valgrind.William Tu2016-01-041-4/+8
| | | | | | | | | | | | | | | | Free memory allocated from table_add_column and table_add_row. Test case: vsctl-bashcomp - basic verification/argument completion(7,8) Call stack is below: xrealloc (util.c:123) table_add_column (table.c:146) or table_add_row (table.c:172) do_list_tables (ovsdb-client.c:449) main (ovsdb-client.c:151) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com> [blp@ovn.org removed an unneeded "if"] Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-server: Fix memory leak using perf counter without initialization.William Tu2015-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | perf_counter_accumulate() is invoked without perf_counters_init() being called first, which leads to a memory leak reported by Valgrind (test cases 104, 106, and 107). A call trace is below: xmalloc (util.c:112) shash_add_nocopy__ (shash.c:109) shash_add_nocopy (shash.c:121) shash_add (shash.c:129) shash_add_once (shash.c:136) shash_add_assert (shash.c:146) perf_counter_init (perf-counter.c:86) perf_counter_accumulate (perf-counter.c:95) ovsdb_txn_commit (transaction.c:850) ovsdb_file_open__ (file.c:217) open_db (ovsdb-server.c:418) main (ovsdb-server.c:263) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: separate json cache for different monitor versionsHan Zhou2015-12-181-6/+20
| | | | | | | | | | | | | | Cached json objects were reused when sending notifications to clients. This created a problem when there were different versions of monitors coexisting. E.g. clients expecting version2 notification would receive messages with method == "update2" but payload in version1 format, which end up failure of processing the updates. This patch fixes the issue by including version in cache node. Signed-off-by: Han Zhou <zhouhan@gmail.com> Acked-by: Andy Zhou <azhou@ovn.org> Signed-off-by: Andy Zhou <azhou@ovn.org>
* jsonrpc-server: Use prototype style for ovsdb_jsonrpc_disable_monitor2().Ben Pfaff2015-12-151-1/+1
| | | | | | | | | | Without "void", this is a pre-ANSI style function definition that has subtly different semantics. Found by sparse. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb: test ovs-vswitchd for backward compatibilityAndy Zhou2015-12-113-1/+33
| | | | | | | | | | | | | | | | | | Add test to make sure ovs-vswitchd fall back to use the "monitor" method when connecting to an older ovsdb-server that does not support "monitor2". For testing backward compatibility, add an ovs-appctl command: "ovsdb-server/disable-monitor2". This command will restart all currently open jsonrpc connections, but without support for 'monitor2' JSON-RPC method for the new connections. There is no corresponding enable command, since this feature is only useful for testing. 'monitor2' will be available when ovsdb-server restarts. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: support monitor2Andy Zhou2015-12-113-13/+168
| | | | | | | | Add monitor2 option to ovsdb-client. See ovsdb-client(1) manpage patch for details. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: enable jasonrpc-server to service monitor2 requestAndy Zhou2015-12-111-6/+33
| | | | | | | | ovsdb-server now accepts the new "monitor2" request. The next patch will switch IDL to use monitor2 by default. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: generate update2 notification for a monitor2 sessionAndy Zhou2015-12-114-27/+219
| | | | | | | | | | Add functions that can generate "update2" notification for a "monitor2" session. "monitor2" and "update2" are RFC 7047 extensions described by ovsdb-server(1) manpage. See the manpage changes for more details. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: refactor, add ovsdb_monitor_max_columns()Andy Zhou2015-12-111-10/+17
| | | | | | | This function will have multiple callers in later patches. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: Add optional table and columns to dump commandBert Vermeulen2015-12-012-22/+56
| | | | | | | | | | | Adding a table to the dump command's arguments retrieves only that table. One or more columns after the table retrieve only those columns. Default behavior is unchanged. Signed-off-by: Bert Vermeulen <bert@biot.com> [blp@ovn.org updated documentation and usage] Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-idl: Add support for change tracking.Shad Ansari2015-11-231-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ovsdb-idl notifies a client that something changed; it does not track which table, row changed in what way (insert, modify or delete). As a result, a client has to scan or reconfigure the entire idl after ovsdb_idl_run(). This is presumably fine for typical ovs schemas where tables are relatively small. In use-cases where ovsdb is used with schemas that can have very large tables, the current ovsdb-idl notification mechanism does not appear to scale - clients need to do a lot of processing to determine the exact change delta. This change adds support for: - Table and row based change sequence numbers to record the most recent IDL change sequence numbers associated with insert, modify or delete update on that table or row. - Change tracking of specific columns. This ensures that changed rows (inserted, modified, deleted) that have tracked columns, are tracked by IDL. The client can directly access the changed rows with get_first, get_next operations without the need to scan the entire table. The tracking functionality is not enabled by default and needs to be turned on per-column by the client after ovsdb_idl_create() and before ovsdb_idl_run(). /* Example Usage */ idl = ovsdb_idl_create(...); /* Track specific columns */ ovsdb_idl_track_add_column(idl, column); /* Or, track all columns */ ovsdb_idl_track_add_all(idl); for (;;) { ovsdb_idl_run(idl); seqno = ovsdb_idl_get_seqno(idl); /* Process only the changed rows in Table FOO */ FOO_FOR_EACH_TRACKED(row, idl) { /* Determine the type of change from the row seqnos */ if (foo_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) >= seqno)) { printf("row deleted\n"); } else if (foo_row_get_seqno(row, OVSDB_IDL_CHANGE_MODIFY) >= seqno)) printf("row modified\n"); } else if (foo_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) >= seqno)) printf("row inserted\n"); } } /* All changes processed - clear the change track */ ovsdb_idl_track_clear(idl); } Signed-off-by: Shad Ansari <shad.ansari@hp.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix outdated comment for function description.Justin Pettit2015-10-221-3/+1
| | | | | Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* ovsdb: Destroy allocated hmap.Justin Pettit2015-10-221-0/+1
| | | | | Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* ovsdb-server: Destroy allocated shash.Justin Pettit2015-10-221-0/+1
| | | | | Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* lib/daemon: support --user option for all OVS daemonAndy Zhou2015-09-302-3/+5
| | | | | | | | | | OVS daemons can now support --user option to run as a non-root user with less privileges. See the manpage patch for more descriptions. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ovsdb: Update _version more accurately in transaction commit.Ben Pfaff2015-09-041-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The _version column in each OVSDB row is supposed to be updated whenever any other column in the row changes. However, the transaction code was not careful to do this only when a row actually changed--there were other cases where a row was considered at transaction commit time and _version updated even though the row did not actually change. For example, ovsdb_txn_adjust_atom_refs() calls find_or_make_txn_row(), which calls ovsdb_txn_row_modify(), which updates _version, but ovsdb_txn_adjust_atom_refs() doesn't actually update any data. One way to fix this would be to carefully consider and adjust all the code that looks at transaction rows. However, this seems somewhat error prone and thus difficult to test. This commit takes a different approach: it drops the code that adjusts _version on the fly, instead replacing it by a final pass over the database at the end of the commit process that checks for each row whether any columns changed and updates _version at that point if any did. That seems pretty foolproof to me. Reported-by: RishiRaj Maulick <rishi.raj2509@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2015-August/059439.html Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com> Tested-by: RishiRaj Maulick <rishi.raj2509@gmail.com>
* ovsdb: Remove misleading OVS_UNUSED from ovsdb_monitor_change_cb().Ben Pfaff2015-08-311-1/+1
| | | | | | | | | This function does use this parameter. (This does not change any behavior.) Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* ovsdb-server: Add the ability to push peer-cert.Gurucharan Shetty2015-08-212-0/+8
| | | | | | | | | | In OVN, ovsdb-server is the daemon that manages the databases and can be called as the central controller. So it would be nice for ovsdb-server to be able to push its self-signed certificate to all the other nodes where ovn-controller runs. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>