On Tue, Oct 25, 2016 at 04:31:15PM -0400, Lance Richardson wrote: > > From: "Lance Richardson" <lrich...@redhat.com> > > To: dev@openvswitch.org > > Sent: Tuesday, October 25, 2016 12:38:49 PM > > Subject: [ovs-dev] [PATCH 2/2] ovn-southbound: implement read-only > > connection support > > > > Add a connection table to the southbound db schema, similar > > to the Open_vSwitch "Manager" table. > > > > Add tests for pssl: and ptcp: read-only connection types. > > > > Add support to ovn-sbctl for listing the SB Connection table. > > > > Potential future work: > > - Test cases for other connection types (punix, ssl, tcp, unix). > > - SSL configuration table for southbound db. > > - Connection table for NB schema. > > > > Signed-off-by: Lance Richardson <lrich...@redhat.com> > > --- > > Also "potential future work": > - Add a way to specify a read-only connection as an ovsdb-server > command-line option.
Thanks. I noticed that the new column here was named "connection_options", patterned after the "manager_options" column in the OVS database. That was an awkward choice in that database but it had to be done because there was already a column named "managers" and we needed to retain backward compatibility. For OVN, we don't have such a column so we can just named it "connections", and I made that change. I also noticed a few minor ways to improve the documentation. I folded in the following and applied this to master, thanks again! --8<--------------------------cut here-------------------------->8-- diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema index c143be0..89342fe 100644 --- a/ovn/ovn-sb.ovsschema +++ b/ovn/ovn-sb.ovsschema @@ -1,7 +1,7 @@ { "name": "OVN_Southbound", - "version": "1.8.0", - "cksum": "2126446681 9019", + "version": "1.9.0", + "cksum": "239060528 9012", "tables": { "SB_Global": { "columns": { @@ -9,7 +9,7 @@ "external_ids": { "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}, - "connection_options": { + "connections": { "type": {"key": {"type": "uuid", "refTable": "Connection"}, "min": 0, diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index 42f8991..45c473c 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -163,11 +163,11 @@ </column> </group> <group title="Connection Options"> - <column name="connection_options"> - Database of client connections to which the Open vSwitch database server - should connect or on which it should listen, along with options for how these - connections should be configured. See the <ref table="Connection"/> table - for more information. + <column name="connections"> + Database clients to which the Open vSwitch database server should + connect or on which it should listen, along with options for how these + connections should be configured. See the <ref table="Connection"/> + table for more information. </column> </group> </table> @@ -2361,6 +2361,11 @@ tcp.flags = RST; values must be unique. Duplicate <ref column="target"/> values yield unspecified results.</p> </column> + + <column name="read_only"> + <code>true</code> to restrict these connections to read-only + transactions, <code>false</code> to allow them to modify the database. + </column> </group> <group title="Client Failure Detection and Handling"> @@ -2378,11 +2383,6 @@ tcp.flags = RST; broken and attempts to reconnect. Default is implementation-specific. A value of 0 disables inactivity probes. </column> - - <column name="read_only"> - <code>true</code> if this connection is restricted to read-only - transactions, <code>false</code> otherwise. - </column> </group> <group title="Status"> diff --git a/tests/ovn.at b/tests/ovn.at index 933f1e6..cb3e7dd 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -5475,14 +5475,14 @@ AT_CHECK( {"op": "insert", "table": "SB_Global", "row": { - "connection_options": ["set", [["named-uuid", "xyz"]]]}}, + "connections": ["set", [["named-uuid", "xyz"]]]}}, {"op": "insert", "table": "Connection", "uuid-name": "xyz", "row": {"target": "ptcp:0:127.0.0.1", "read_only": true}}]']], [0], [ignore], [ignore]) -start_daemon ovsdb-server --remote=punix:ovn-sb.sock --remote=db:OVN_Southbound,SB_Global,connection_options ovn-sb.db +start_daemon ovsdb-server --remote=punix:ovn-sb.sock --remote=db:OVN_Southbound,SB_Global,connections ovn-sb.db PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) @@ -5515,7 +5515,7 @@ AT_CHECK( {"op": "insert", "table": "SB_Global", "row": { - "connection_options": ["set", [["named-uuid", "xyz"]]]}}, + "connections": ["set", [["named-uuid", "xyz"]]]}}, {"op": "insert", "table": "Connection", "uuid-name": "xyz", @@ -5523,7 +5523,7 @@ AT_CHECK( "read_only": true}}]']], [0], [ignore], [ignore]) start_daemon ovsdb-server --remote=punix:ovn-sb.sock \ - --remote=db:OVN_Southbound,SB_Global,connection_options \ + --remote=db:OVN_Southbound,SB_Global,connections \ --private-key="$PKIDIR/testpki-privkey2.pem" \ --certificate="$PKIDIR/testpki-cert2.pem" \ --ca-cert="$PKIDIR/testpki-cacert.pem" \ _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev