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

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


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 6d03405394b98ca934c274d6c4fc0ac1328c4adc
      https://github.com/openvswitch/ovs/commit/6d03405394b98ca934c274d6c4fc0ac1328c4adc
  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: 7efc698014aa243139c33afc285c150bd0952d3f
      https://github.com/openvswitch/ovs/commit/7efc698014aa243139c33afc285c150bd0952d3f
  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/2947774c5501...7efc698014aa


More information about the git mailing list