summaryrefslogtreecommitdiff
path: root/ovsdb
Commit message (Collapse)AuthorAgeFilesLines
* Add read-only option to ovs-dpctl and ovs-ofctl commands.Ryan Moats2016-08-151-14/+14
| | | | | | | | | ovs-dpctl and ovs-ofctl lack a read-only option to prevent running of commands that perform read-write operations. Add it and the necessary scaffolding to each. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Make OVSDB backup sever read onlyAndy Zhou2016-08-149-42/+116
| | | | | | | | | | | | | When ovsdb-sever is running in the backup state, it would be nice to make sure there is no un-intended changes to the backup database. This patch makes the ovsdb server only accepts 'read' transactions as a backup server. When the server role is changed into an active server, all existing client connections will be reset. After reconnect, all clinet transactions will then be accepted. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix bug, set rpc to NULL after freeing.Andy Zhou2016-08-141-1/+2
| | | | | | | | | Found by inspection. Tested-by: Daniel Levy <dlevy@us.ibm.com> Reported-at: http://openvswitch.org/pipermail/discuss/2016-August/022322.html Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Add replication waitAndy Zhou2016-08-143-0/+12
| | | | | | | | Poll_block() requires the run() function to be paired with a wait() function. Add one for replication. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Rename replication related variable names.Andy Zhou2016-08-144-59/+59
| | | | | | | | | | | | Current replication code refers the other ovsdb-sever instance as a 'remote'. which is overloaded in ovsdb. Switching to use active/backup instead to make it less confusing. Active is the server that should be servicing the client, backup server is the server that boots with the --sync-from option. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Add/use partial set updates.Ryan Moats2016-08-141-1/+64
| | | | | | | | | | | | | | | | | | | | This patchset mimics the changes introduced in f199df26 (ovsdb-idl: Add partial map updates functionality.) 010fe7ae (ovsdb-idlc.in: Autogenerate partial map updates functions.) 7251075c (tests: Add test for partial map updates.) b1048e6a (ovsdb-idl: Fix issues detected in Partial Map Update feature) but for columns that store sets of values rather than key-value pairs. These columns will now be able to use the OVSDB mutate operation to transmit deltas on the wire rather than use verify/update and transmit wait/update operations on the wire. Side effect of modifying the comments in the partial map update tests. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Use better error message for "timeout" without waiting.Ryan Moats2016-08-131-1/+2
| | | | | | | | | | | | | When setting a where clause, if the timeout is set to a value of 0, the clause is tested once and if it fails, a message of '"wait" timed out' is returned. This can be misleading because there wasn't any real time, so change the message to '"where" clause test failed'. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Reported-by: Ryan Moats <rmoats@us.ibm.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-August/077083.html Fixes: f85f8ebb ("Initial implementation of OVSDB.") Signed-off-by: Ben Pfaff <blp@ovn.org>
* Windows: Local named pipe implementationAlin Serdean2016-08-032-4/+5
| | | | | | | | | | | | | | | | | | | | | Currently in the case of command line arguments punix/unix, on Windows we create a file, write a TCP port number to connect. This is a security concern. This patch adds support for the command line arguments punix/unix trying to mimic AF_UNIX behind a local named pipe. This patch drops the TCP socket implementation behind command line arguments punix/unix and switches to the local named pipe implementation. Since we do not write anything to the file created by the punix/unix arguments, switch tests to plain file existence. Man pages and code comments have been updated. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Paul Boca <pboca@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* ovsdb: Fix memory leak in execute_update.William Tu2016-08-021-0/+3
| | | | | | | | | | | | | | | | Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value reports the following leak. json_from_string (json.c:1025) execute_update (replication.c:614), similarily at execute_delete() process_table_update (replication.c:502) process_notification.part.5 (replication.c:445) process_notification (replication.c:402) check_for_notifications (replication.c:418) replication_run (replication.c:110) Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Andy Zhou <azhou@ovn.org> Signed-off-by: Andy Zhou <azhou@ovn.org>
* ovsdb: Fix OVSDB disconnect replication bugMario Cabrera2016-08-013-12/+23
| | | | | | | | | | | | | Currently disconnecting from the replicator server means closing the jsonrpc connection and destroying the monitored table names and blacklisted table names. This patch makes a distinction between disconnecting from the remote server, applicable when the replication incurs in an error, and destroying the remote server info, applicable when ovsdb-server exits gracefully. Signed-off-by: Mario Cabrera <mario.cabrera@hpe.com>
* ovsdb-client: Fix memory leak reported by Valgrind.William Tu2016-07-271-0/+1
| | | | | | | | | | | | Testcase 1857: ovsdb-monitor.at:538 monitor-cond-change reports the following definitely memory leak: ovsdb_schema_create (ovsdb.c:34) ovsdb_schema_from_json (ovsdb.c:196) fetch_schema (ovsdb-client.c:385) do_monitor_cond (ovsdb-client.c:1112) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Fix memory leak in replication logicAndy Zhou2016-07-271-0/+2
| | | | | | | | Release the memory of reply message of the initial "monitor" request. Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* ovsdb: Properly close replication rpc connectionAndy Zhou2016-07-272-0/+2
| | | | | | | | This patch removes rpc related memory leak reported below. Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* ovsdb: Fix memory leak reported by valgrind.Liran Schour2016-07-271-0/+1
| | | | | | | | | Destroy shash on destroy of session's condition structure. Reported here: http://openvswitch.org/pipermail/dev/2016-July/075968.html Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* ovsdb: Weak references performance fixRodriguez Betancourt, Esteban2016-07-262-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents the cloning of rows with outgoing or incoming weak references when those rows aren't being modified. It improves the OVSDB Server performance when many rows with weak references are involved in a transaction. In the original code (dst_refs is created from scratch): old->dst_refs = all the rows that weak referenced old new->dst_refs = all the rows that weak referenced old and are still weak +referencing new + rows in the transaction that weak referenced new In the patch (dst_refs incrementally built): Old->dst_refs = all the rows that weak referenced old Ideally, but expansive to calculate: New->dst_refs = old->dst_refs - "weak references removed within this TXN" + +"weak references created within this TXN" What this patch implements: New->dst_refs = old->dst_refs - "weak references in old rows in TXN" + "weak +references in new rows in TXN" The resulting sets should be equal in both cases. We do some more optimizations: - If we know that the transactions must be successful at some point then, instead of cloning dst_refs we could just move the elements between the lists. - At that point we lost the rollback feature, but we aren't going to need it anyway (note that we didn't really touch the src_refs part). - The references in dst_refs must point to new instead than old. Previously we iterated over all the weak references in dst_refs to change that pointer, but using an UUID is easier, and prevents that iteration completely. For some more commentary, see: http://openvswitch.org/pipermail/dev/2016-July/074840.html Signed-off-by: Esteban Rodriguez Betancourt <estebarb@hpe.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-2222-28/+39
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Add ovsdb-client options for testing lockAndy Zhou2016-07-222-0/+222
| | | | | | | | | | | | RFC 7047 lock operation has been fully implemented in ovsdb-server for a while, but it is not well covered in unit testing. This patch adds options for the ovsdb-client tool to issue lock operations. The next patch will make use those options. Please see ovsdb-client(1) changes for more details. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Add unixctl commands for OVSDB replicationMario Cabrera2016-07-194-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | Set and get the server to replicate from: ovsdb-server/set-remote-ovsdb-server {server} ovsdb-server/get-remote-ovsdb-server Set and get the replicated table blacklist: ovsdb-server/set-sync-excluded-tables {DB:table,...} ovsdb-server/get-sync-excluded-tables Connect to the configured server and start replication: ovsdb-server/connect-remote-ovsdb-server Disconnect from the remote server and stop replication, without dropping the replicated data: ovsdb-server/disconnect-remote-ovsdb-server Signed-off-by: Mario Cabrera <mario.cabrera@hpe.com> Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* lib: add monitor_cond_change API to C IDL libLiran Schour2016-07-182-29/+363
| | | | | | | | | | Add to IDL API that allows the user to add and remove clauses on a table's condition iteratively. IDL maintain tables condition and send monitor_cond_change to the server upon condition change. Add tests for conditional monitoring to IDL. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-client: support monitor-cond methodLiran Schour2016-07-185-56/+115
| | | | | | | | | | Add monitor_cond method to ovsdb-client. Enable testing of monitor_cond_change via unixctl command.Add unit tests for monitor_cond and monitor_cond_change. See ovsdb-client(1) man page for details. Replace monitor2 with monitor_cond. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: optimize match_any_clause() condition evaluationLiran Schour2016-07-185-10/+125
| | | | | | | | Optimize ovsdb_condition_match_any_clause() to be in O(#columns in condition) and not O(#clauses) in case condition's caluses function is boolean or "==". Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: enable jsonrpc-server to service "monitor_cond_change" requestLiran Schour2016-07-184-63/+444
| | | | | | | | | | | ovsdb-server now accepts "monitor_cond_change" request. After conditions change we compose update notification according to the current state of the database without using a change list before sending reply to the monitor_cond_change request. Sees ovsdb-server (1) man page for details of monitor_cond_change. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: generate update notifications for monitor_cond sessionLiran Schour2016-07-184-53/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hold session's conditions in ovsdb_monitor_session_condition. Pass it to ovsdb_monitor for generating "update2" notifications. Add functions that can generate "update2" notification for a "monitor_cond" session. JSON cache is enabled only for session's with true condition only. "monitor_cond" and "monitor_cond_change" are RFC 7047 extensions described by ovsdb-server(1) manpage. Performance evaluation: OVN is the main candidate for conditional monitoring usage. It is clear that conditional monitoring reduces computation on the ovn-controller (client) side due to the reduced size of flow tables and update messages. Performance evaluation shows up to 75% computation reduction. However, performance evaluation shows also a reduction in computation on the SB ovsdb-server side proportional to the degree that each logical network is spread over physical hosts in the DC. Evaluation shows that in a realistic scenarios there is a computation reduction also in the server side. Evaluation on simulated environment of 50 hosts and 1000 logical ports shows the following results (cycles #): LN spread over # hosts| master | patch | change ------------------------------------------------------------- 1 | 24597200127 | 24339235374 | 1.0% 6 | 23788521572 | 19145229352 | 19.5% 12 | 23886405758 | 17913143176 | 25.0% 18 | 25812686279 | 23675094540 | 8.2% 24 | 28414671499 | 24770202308 | 12.8% 30 | 31487218890 | 28397543436 | 9.8% 36 | 36116993930 | 34105388739 | 5.5% 42 | 37898342465 | 38647139083 | -1.9% 48 | 41637996229 | 41846616306 | -0.5% 50 | 41679995357 | 43455565977 | -4.2% Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: allow unmonitored columns in condition evaluationLiran Schour2016-07-183-23/+36
| | | | | | | | | | | | This commit allows to add unmonitored columns to a monitored table due to condition update. It will be used to evaluate conditions on unmonitored columns. Update notification includes only monitored columns. Due to the limited number of columns, we do not remove unused unmonitored columns on condition update for code simplicity. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: add conditions utilities to support monitor_condLiran Schour2016-07-184-20/+217
| | | | | | | | | Change ovsdb_condition to be a 3-element json array or a boolean value (see ovsdb-server man page). Conditions utilities will be used later for conditional monitoring. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: create column index mapping between ovsdb row to monitor rowLiran Schour2016-07-183-44/+53
| | | | | | | | Columns indexing is different in ovsdb_row then in ovsdb_monitor_row. We need mapping between the 2 for condition evaluation. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* sset: New function sset_from_delimited_string().Ben Pfaff2016-07-131-11/+1
| | | | | | | This simplifies code in a couple of places. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-By: Ryan Moats <rmoats@us.ibm.com>
* ovsdb-client: Move iterator definition to prevent shadowing.Justin Pettit2016-07-131-2/+1
| | | | | | | This doesn't fix a bug, but is more standard. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* 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>