[ovs-git] [openvswitch/ovs] 9f3962: ovsdb-cluster-testsuite.at: Restores "clustered tr...

Han Zhou noreply at github.com
Mon Apr 22 20:15:15 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 9f39622ab2c67b2f1496b9ee9a395c204527f584
      https://github.com/openvswitch/ovs/commit/9f39622ab2c67b2f1496b9ee9a395c204527f584
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-04-22 (Mon, 22 Apr 2019)

  Changed paths:
    M tests/automake.mk
    M tests/ovsdb-cluster-testsuite.at

  Log Message:
  -----------
  ovsdb-cluster-testsuite.at: Restores "clustered transactions" tests back.

In commit-2bcb3b70 (ovsdb raft: Move ovsdb cluster tests to separate
testsuite.) the "clustered transactions" tests were left unexecuted
because they depend on "EXECUTION_EXAMPLES", which is defined in
ovsdb-execution.at.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 4d9b28cbb797ad112d2aefccab93c7d37493941a
      https://github.com/openvswitch/ovs/commit/4d9b28cbb797ad112d2aefccab93c7d37493941a
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-04-22 (Mon, 22 Apr 2019)

  Changed paths:
    M ovsdb/raft.c
    M tests/ovsdb-cluster.at

  Log Message:
  -----------
  ovsdb raft: Avoid unnecessary reconnecting during leader election.

If a server claims itself as "disconnected", all clients connected
to that server will try to reconnect to a new server in the cluster.

However, currently a server would claim itself as disconnected even
when itself is the candidate and try to become the new leader (most
likely it will be), and all its clients will reconnect to another
node.

During a leader fail-over (e.g. due to a leader failure), it is
expected that all clients of the old leader will have to reconnect
to other nodes in the cluster, but it is unnecessary for all the
clients of a healthy node to reconnect, which could cause more
disturbance in a large scale environment.

This patch fixes the problem by slightly change the condition that
a server regards itself as disconnected: if its role is candidate,
it is regarded as disconnected only if the election didn't succeed
at the first attempt. Related failure test cases are also unskipped
and all passed with this patch.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/ba11e1628888...4d9b28cbb797


More information about the git mailing list