diff options
author | Numan Siddique <numans@ovn.org> | 2019-10-21 22:26:51 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-10-24 14:25:40 -0700 |
commit | cec7005bde4bc81de7b94a3dc4b4160800c98be7 (patch) | |
tree | 474f48a00bbba1b12c9de8724ebb733c284c0698 /tests/ovsdb-replication.at | |
parent | f04977508f97ffedea9c3588dbd7d57ed288e7fd (diff) | |
download | openvswitch-cec7005bde4bc81de7b94a3dc4b4160800c98be7.tar.gz |
ovsdb-server: Allow replication from older schema version servers.
Presently, replication is not allowed if there is a schema version mismatch between
the schema returned by the active ovsdb-server and the local db schema. This is
causing failures in OVN DB HA deployments during uprades.
In the case of OpenStack tripleo deployment with OVN, OVN DB ovsdb-servers are
deployed on a multi node controller cluster in active/standby mode. During
minor updates or major upgrades, the cluster is updated one at a time. If
a node A is running active OVN DB ovsdb-servers and when it is updated, another
node B becomes active. After the update when OVN DB ovsdb-servers in A are started,
these ovsdb-servers fail to replicate from the active if there is a schema
version mismatch.
This patch addresses this issue by allowing replication even if there is a
schema version mismatch only if all the active db schema tables and its colums are
present in the local db schema.
This should not result in any data loss.
Signed-off-by: Numan Siddique <numans@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/ovsdb-replication.at')
-rw-r--r-- | tests/ovsdb-replication.at | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ovsdb-replication.at b/tests/ovsdb-replication.at index f81381bdb..82c416052 100644 --- a/tests/ovsdb-replication.at +++ b/tests/ovsdb-replication.at @@ -19,6 +19,29 @@ replication_schema () { } EOF } +replication_schema_v2 () { + cat <<'EOF' + {"name": "mydb", + "tables": { + "a": { + "columns": { + "number": {"type": "integer"}, + "name": {"type": "string"}}, + "indexes": [["number"]]}, + "b": { + "columns": { + "number": {"type": "integer"}, + "name": {"type": "string"}, + "foo" : {"type": "string"}}, + "indexes": [["number"]]}, + "c": { + "columns": { + "number": {"type": "integer"}, + "name": {"type": "string"}}, + "indexes": [["number"]]}} + } +EOF +} ] m4_divert_pop([PREPARE_TESTS]) |