When upgrading from deployments that were running older versions of OVN
(before the "type" column had been added to the Datapath_Binding schema)
there's no value available for the new "type" column so its value is
kept as default, an empty string.
While ovn-northd and ovn-controller correctly handle that because they
fall back to the old mechanism (of checking external-ids) backup
ovsdb-servers will check the schema constraints and fail because:
unexpected ovsdb error: constraint violation: ""
is not one of the allowed values ([logical-router, logical-switch])
Make the "type" value optional to avoid this upgrade issue. ovn-northd
will set the column to a proper value (logical-router/switch) when it
first runs.
Fixes: 6919992d8781 ("Datapath_Binding: Separate type column and sync NB.UUID
to SB.")
Reported-at:
https://mail.openvswitch.org/pipermail/ovs-dev/2025-August/425789.html
Reported-by: Ilya Maximets <[email protected]>
Signed-off-by: Dumitru Ceara <[email protected]>
---
V2:
- Shortened commit title.
---
ovn-sb.ovsschema | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema
index f64cb99dd3..e1eac792e8 100644
--- a/ovn-sb.ovsschema
+++ b/ovn-sb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Southbound",
"version": "21.4.0",
- "cksum": "812831561 35225",
+ "cksum": "789362186 35279",
"tables": {
"SB_Global": {
"columns": {
@@ -199,7 +199,8 @@
"type": {"type": {"key": {"type": "string",
"enum": ["set",
["logical-switch",
- "logical-router"]]}}},
+ "logical-router"]]},
+ "min": 0, "max": 1}},
"external_ids": {
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
--
2.50.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev