[ovs-dev] [PATCH] ovn-sb.ovsschema: Avoid duplicated IPs in Encap table.

Han Zhou zhouhan at gmail.com
Tue Nov 13 01:23:52 UTC 2018


From: Han Zhou <hzhou8 at ebay.com>

When adding a new chassis, if there is an old chassis with same IP
existed in Encap table, it is allowed to be added today. However,
allowing it to be added results in problems:

1. The new chassis cannot work because none of the other chassises
   are able to create tunnel to it, because of the IP confliction
   with already existed tunnel to the old chassis.

2. All the other chassises will continuously retry creating the tunnel
   and complaining about the error.

So, instead of hiding the problem, it is better to expose it while
trying to add the second chassis with duplicated IP. This patch
ensures it from the ovsdb schema.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
---
 ovn/ovn-sb.ovsschema | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema
index 5b9537f..5c68b78 100644
--- a/ovn/ovn-sb.ovsschema
+++ b/ovn/ovn-sb.ovsschema
@@ -1,7 +1,7 @@
 {
     "name": "OVN_Southbound",
-    "version": "1.17.0",
-    "cksum": "3217981733 15045",
+    "version": "1.18.0",
+    "cksum": "853037077 15078",
     "tables": {
         "SB_Global": {
             "columns": {
@@ -50,7 +50,8 @@
                                      "min": 0,
                                      "max": "unlimited"}},
                 "ip": {"type": "string"},
-                "chassis_name": {"type": "string"}}},
+                "chassis_name": {"type": "string"}},
+            "indexes": [["ip"]]},
         "Address_Set": {
             "columns": {
                 "name": {"type": "string"},
-- 
2.1.0



More information about the dev mailing list