[ovs-git] [openvswitch/ovs] 9f301d: ovsdb-cluster.at: Wait until leader is elected bef...

Han Zhou noreply at github.com
Fri Dec 20 21:01:54 UTC 2019


  Branch: refs/heads/branch-2.12
  Home:   https://github.com/openvswitch/ovs
  Commit: 9f301dc92a45206edaeb9cf0f3a9d7e01c32499a
      https://github.com/openvswitch/ovs/commit/9f301dc92a45206edaeb9cf0f3a9d7e01c32499a
  Author: Han Zhou <hzhou at ovn.org>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M tests/ovsdb-cluster.at

  Log Message:
  -----------
  ovsdb-cluster.at: Wait until leader is elected before DB compact.

In test case "election timer change", before testing DB compact,
we had to insert some data. Otherwise, inserting data after DB
compact will cause busy loop as mentioned in the XXX comment.

The root cause of the busy loop is still not clear, but the test
itself didn't wait until the leader election finish before initiating
DB compact. This patch adds the wait to make sure the test continue
after leader is elected so that the following tests are based on
a clean state. While this wait is added, the busy loop problem is
gone even without inserting the data, so the additional data insertion
is also removed by this patch.

A separate patch will address the busy loop problem in the scenario:
1. Restart cluster
2. DB compact before the cluster is ready
3. Insert data

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


  Commit: 62b3f430c29799ee4ef09b058105883939e06d37
      https://github.com/openvswitch/ovs/commit/62b3f430c29799ee4ef09b058105883939e06d37
  Author: Han Zhou <hzhou at ovn.org>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

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

  Log Message:
  -----------
  ovsdb raft: Fix the problem when cluster restarted after DB compaction.

Cluster doesn't work after all nodes restarted after DB compaction,
unless there is any transaction after DB compaction before the restart.

Error log is like:
raft|ERR|internal error: deferred vote_request message completed but not ready
to send because message index 9 is past last synced index 0: s2 vote_request:
term=6 last_log_index=9 last_log_term=4

The root cause is that the log_synced member is not initialized when
reading the raft header. This patch fixes it and remove the XXX
from the test case.

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


Compare: https://github.com/openvswitch/ovs/compare/1b3faafb1ee7...62b3f430c297


More information about the git mailing list