[ovs-git] [openvswitch/ovs] 777a9f: ovsdb: Properly handle error returned from from re...

GitHub noreply at github.com
Sun Sep 4 04:37:12 UTC 2016


  Branch: refs/heads/branch-2.6
  Home:   https://github.com/openvswitch/ovs
  Commit: 777a9f7d9ab835e9bcabc1c95d031fa190ad7b0f
      https://github.com/openvswitch/ovs/commit/777a9f7d9ab835e9bcabc1c95d031fa190ad7b0f
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M ovsdb/replication.c

  Log Message:
  -----------
  ovsdb: Properly handle error returned from from reset_database()

Fix a memory leak in case of error. The error object was not properly
disposed.  Since the error to reset DB is not expected, log it and
exit.

Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: 90e125f3a204de5cb4d7a88a89b4427b22d8a577
      https://github.com/openvswitch/ovs/commit/90e125f3a204de5cb4d7a88a89b4427b22d8a577
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M ovsdb/ovsdb-server.c
    M ovsdb/replication.c
    M ovsdb/replication.h
    M tests/ovsdb-server.at

  Log Message:
  -----------
  ovsdb: Add blacklist_tables

Currently, 'sync-exclude-tables' command line options are simply stored
in a string. Change the implementation to store it in an shash instead
to improve modularity.

One additional benefit of this change is that errors can be detected
and reported to user earlier.  Adde a 'dryrun' option to
set_blacklist_tables() API to make this feature available to the
command line option parsing and unixctl command parsing.

Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: 39e7e4e0eb14c2a095302610cefe056060009117
      https://github.com/openvswitch/ovs/commit/39e7e4e0eb14c2a095302610cefe056060009117
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M ovsdb/replication.c

  Log Message:
  -----------
  ovsdb: Add request_ids

When starting, the replication logic may issue multiple requests at
a time, for example, one monitor request for each databases. The
request_ids keeps track of all outsanding request IDs that are used
for matching reply message with. It also provides the 'db' context
for the reply.

Future patches will make use of this facility.

Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: f72fc2e54ad07193db3b696f2482f598c24ffd31
      https://github.com/openvswitch/ovs/commit/f72fc2e54ad07193db3b696f2482f598c24ffd31
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M ovsdb/ovsdb-server.c
    M ovsdb/replication.c
    M ovsdb/replication.h

  Log Message:
  -----------
  ovsdb: (Re)hide struct db in ovsdb-server.c

It seems odd that the currently replication implementation moves the
struct db from ovsdb-server.c (file private) to replication.h (global).

This patch moves the 'struct db' defintion back into ovsdb-server.c,

Signed-off-by: Andy Zhou <azhou at ovn.org>


  Commit: 9ac7035ff77637b321556cf8af6d845ca6d6ef18
      https://github.com/openvswitch/ovs/commit/9ac7035ff77637b321556cf8af6d845ca6d6ef18
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M tests/ovsdb-replication.at
    M tests/ovsdb-server.at

  Log Message:
  -----------
  test: Improve replication unit tests

Replication test currently uses many sleeps that slowes the test down
and may not be reliable. Remove those sleeps when possible.

OVSDB servers needs to be killed on test failure. Use on_exit() to
ensure cleanup happens, so they don't have to be handled for each
testing step.

Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: d2541846ec02fd3fed9fa0ebd66e5d1e72acb6b9
      https://github.com/openvswitch/ovs/commit/d2541846ec02fd3fed9fa0ebd66e5d1e72acb6b9
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M ovsdb/ovsdb-server.c
    M ovsdb/replication.c
    M ovsdb/replication.h

  Log Message:
  -----------
  ovsdb: Reimplement replication. Using a state machine.

Current replication uses blocking transactions, which are error prone
in practice, especially in handling RPC connection flapping to the
active server.

Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: 77eb90b24be3f21887d321cce19b1981c64912ea
      https://github.com/openvswitch/ovs/commit/77eb90b24be3f21887d321cce19b1981c64912ea
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M Documentation/OVSDB-replication.md
    M ovsdb/jsonrpc-server.c
    M ovsdb/jsonrpc-server.h
    M ovsdb/ovsdb-server.1.in
    M ovsdb/ovsdb-server.c
    M ovsdb/replication.c
    M ovsdb/replication.h
    M ovsdb/replication.man
    M tests/ovsdb-server.at

  Log Message:
  -----------
  ovsdb: Replication usability improvements

Based on feedbacks from initial HA manager integration, added the
'--active' command line option and appctl command
"ovsdb-server/sync-status. See man page updates for details.

Added the RPL_S_INIT state in the state machine. This state is
not strictly necessary for the replication state machine, but is
introduced to make sure the state is update immediately when
the state machine is reset, via replication_init(). Without it
ovsdb/sync-status may display "replicating" or crash, if the command
is issued between after replication_init() is called, but before
the state variable is updated from replication_run().

Added a test to simulate the integration of HA manager with OVSDB
server using replication.

Other documentation and API improvements.

Tested-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/1d68c1f6976e...77eb90b24be3


More information about the git mailing list