[ovs-dev] [PATCH] vswitchd: Require "target" column to be unique in OVS database.

Ben Pfaff blp at nicira.com
Fri Feb 1 22:51:46 UTC 2013

Commit cc7ecee48 (vswitchd: Add unique indexes for some columns.) says,
in part:

    With this commit, the database server itself rejects attempts to add
    Port or Interface records with duplicate names or Controller or
    Manager records with duplicate targets.

but in fact didn't change the Controller table as described.  This commit
fixes that.

This commit updates the schema version number's major version, because this
is a potentially non-backward compatible change, if some user depended on
the ability to add Controller records with duplicate targets.  However, if
anyone thinks this is a bad idea, then I'm open to discussion.

Reported-by: Natasha Gude <natasha at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
This is a repost of a patch originally posted Dec. 4, 2012.

 vswitchd/vswitch.ovsschema |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema
index 16125a5..025686b 100644
--- a/vswitchd/vswitch.ovsschema
+++ b/vswitchd/vswitch.ovsschema
@@ -1,6 +1,6 @@
 {"name": "Open_vSwitch",
- "version": "6.11.3",
- "cksum": "2234602985 17310",
+ "version": "7.0.0",
+ "cksum": "1525609876 17339",
  "tables": {
    "Open_vSwitch": {
      "columns": {
@@ -428,7 +428,8 @@
          "ephemeral": true},
        "status": {
          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"},
-         "ephemeral": true}}},
+         "ephemeral": true}},
+     "indexes": [["target"]]},
    "Manager": {
      "columns": {
        "target": {

More information about the dev mailing list