]> git.proxmox.com Git - ovs.git/commitdiff
ovn: change load balancer references to weak in NB schema
authorDaniel Alvarez <dalvarez@redhat.com>
Mon, 11 Feb 2019 16:06:14 +0000 (17:06 +0100)
committerBen Pfaff <blp@ovn.org>
Mon, 11 Feb 2019 16:45:39 +0000 (08:45 -0800)
When a load balancer is added to multiple logical switches
and routers it has be to be removed from all of them before
being able to delete due to the current 'strong' reference
in the NB schema.

By changing it to 'weak', users can simply remove the load
balancer without having to remove all the references manually.
In particular, this will make things easier for networking-ovn,
the OpenStack integration project as it'll save some
calculations upon load balancer deletion.

The update path has been successfully from the previous version
of the schema.

Acked-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovn/ovn-nb.ovsschema
tests/ovn-nbctl.at

index f3683df14c1463ff64b757bafc5e40f46876a505..10a59649aef9608e1cb75324349c2fb3b311b49b 100644 (file)
@@ -1,7 +1,7 @@
 {
     "name": "OVN_Northbound",
-    "version": "5.14.0",
-    "cksum": "3600467067 20513",
+    "version": "5.14.1",
+    "cksum": "3758097843 20509",
     "tables": {
         "NB_Global": {
             "columns": {
@@ -46,7 +46,7 @@
                                   "max": "unlimited"}},
                 "load_balancer": {"type": {"key": {"type": "uuid",
                                                   "refTable": "Load_Balancer",
-                                                  "refType": "strong"},
+                                                  "refType": "weak"},
                                            "min": 0,
                                            "max": "unlimited"}},
                 "dns_records": {"type": {"key": {"type": "uuid",
                                  "max": "unlimited"}},
                 "load_balancer": {"type": {"key": {"type": "uuid",
                                                   "refTable": "Load_Balancer",
-                                                  "refType": "strong"},
+                                                  "refType": "weak"},
                                            "min": 0,
                                            "max": "unlimited"}},
                 "options": {
index f55277ceec25857ce45bb7cc327fe99f73f81c0d..7a5903c3a2313975bad3206155617401d5f9cd63 100644 (file)
@@ -752,7 +752,15 @@ AT_CHECK([ovn-nbctl lr-lb-add lr0 lb0])
 AT_CHECK([ovn-nbctl lr-lb-add lr0 lb1])
 AT_CHECK([ovn-nbctl lr-lb-add lr0 lb3])
 AT_CHECK([ovn-nbctl lr-lb-del lr0])
-AT_CHECK([ovn-nbctl lr-lb-list lr0 | uuidfilt], [0], [])])
+AT_CHECK([ovn-nbctl lr-lb-list lr0 | uuidfilt], [0], [])
+
+dnl Remove load balancers after adding them to a logical router/switch.
+AT_CHECK([ovn-nbctl lr-lb-add lr0 lb0])
+AT_CHECK([ovn-nbctl ls-lb-add ls0 lb1])
+AT_CHECK([ovn-nbctl lb-del lb0])
+AT_CHECK([ovn-nbctl lb-del lb1])
+AT_CHECK([ovn-nbctl lr-lb-list lr0 | uuidfilt], [0], [])
+AT_CHECK([ovn-nbctl ls-lb-list ls0 | uuidfilt], [0], [])])
 
 dnl ---------------------------------------------------------------------