Skip to content

Commit

Permalink
vswitchd: Require "target" column to be unique in OVS database.
Browse files Browse the repository at this point in the history
Commit cc7ecee (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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Ethan Jackson <[email protected]>
  • Loading branch information
blp committed Feb 11, 2013
1 parent 7cf2e08 commit 41219e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vswitchd/vswitch.ovsschema
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{"name": "Open_vSwitch",
"version": "7.0.0",
"cksum": "3537583872 17299",
"cksum": "438518409 17329",
"tables": {
"Open_vSwitch": {
"columns": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 41219e6

Please sign in to comment.