From 289df16d29e963aef8c9df590300add4ab722ac9 Mon Sep 17 00:00:00 2001 From: Andrew Evans Date: Fri, 18 Feb 2011 09:50:12 -0800 Subject: [PATCH] ovsdb: Remove 'managers' column from 'Open vSwitch' table. We had retained but deprecated the use of the older 'managers' column in the 'Open vSwitch' table for compatibility with applications that might still use it, but that created more problems than it solved. This commit removes the 'managers' column from the schema, and removes all references to it from the code, init scripts, documentation, and tests. --- INSTALL.Linux | 2 +- debian/openvswitch-switch.init | 1 - tests/ovs-vsctl.at | 2 +- utilities/ovs-vsctl.8.in | 10 +++++----- utilities/ovs-vsctl.c | 16 ---------------- vswitchd/bridge.c | 9 +++------ vswitchd/vswitch.ovsschema | 6 ++---- vswitchd/vswitch.xml | 15 --------------- xenserver/etc_init.d_openvswitch | 2 +- ..._share_openvswitch_scripts_sysconfig.template | 2 +- 10 files changed, 14 insertions(+), 51 deletions(-) diff --git a/INSTALL.Linux b/INSTALL.Linux index 8ba73ed3..103805ae 100644 --- a/INSTALL.Linux +++ b/INSTALL.Linux @@ -256,7 +256,7 @@ configuration in the database: % ovsdb-server /usr/local/etc/openvswitch/conf.db \ --remote=punix:/usr/local/var/run/openvswitch/db.sock \ - --remote=db:Open_vSwitch,managers \ + --remote=db:Open_vSwitch,manager_options \ --private-key=db:SSL,private_key \ --certificate=db:SSL,certificate \ --bootstrap-ca-cert=db:SSL,ca_cert \ diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 29c8c655..92ab7756 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -261,7 +261,6 @@ case "$1" in set -- "$@" --log-file=/var/log/openvswitch/ovsdb-server.log set -- "$@" --detach --no-chdir --pidfile $monitor_opt set -- "$@" --remote punix:/var/run/openvswitch/db.sock - set -- "$@" --remote db:Open_vSwitch,managers set -- "$@" --remote db:Open_vSwitch,manager_options set -- "$@" --private-key=db:SSL,private_key set -- "$@" --certificate=db:SSL,certificate diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index 7488e3dd..b0c10267 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -707,7 +707,7 @@ AT_CHECK([RUN_OVS_VSCTL( [add-bond br0 bond0 eth0 eth1], [set port bond0 bond_updelay=500 other-config:abc=def])], [0], [], [], [OVS_VSCTL_CLEANUP]) -AT_CHECK([RUN_OVS_VSCTL([[wait-until Open_vSwitch . managers=[]]])], +AT_CHECK([RUN_OVS_VSCTL([[wait-until Open_vSwitch . manager_options=[]]])], [0], [], [], [OVS_VSCTL_CLEANUP]) AT_CHECK([RUN_OVS_VSCTL([[wait-until Open_vSwitch . bridges!=[]]])], [0], [], [], [OVS_VSCTL_CLEANUP]) diff --git a/utilities/ovs-vsctl.8.in b/utilities/ovs-vsctl.8.in index 1702aacc..94e0c7ca 100644 --- a/utilities/ovs-vsctl.8.in +++ b/utilities/ovs-vsctl.8.in @@ -370,11 +370,11 @@ Sets the configured failure mode. . .SS "Manager Connectivity" . -These commands manipulate the \fBmanagers\fR and \fBmanager_options\fR columns -in the \fBOpen_vSwitch\fR table and rows in the \fBManagers\fR table. When -\fBovsdb\-server\fR is configured to use those rows and columns for OVSDB -connections, as described in \fBINSTALL.Linux\fR and in the startup scripts -provided with Open vSwitch, this allows the administrator to use +These commands manipulate the \fBmanager_options\fR column in the +\fBOpen_vSwitch\fR table and rows in the \fBManagers\fR table. When +\fBovsdb\-server\fR is configured to use the \fBmanager_options\fR column for +OVSDB connections (as described in \fBINSTALL.Linux\fR and in the startup +scripts provided with Open vSwitch), this allows the administrator to use \fBovs\-vsctl\fR to configure database connections. . .IP "\fBget\-manager\fR" diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 3a93ef38..31c485ba 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -1009,7 +1009,6 @@ cmd_init(struct vsctl_context *ctx OVS_UNUSED) static void pre_cmd_emer_reset(struct vsctl_context *ctx) { - ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_managers); ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_manager_options); ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_ssl); @@ -1044,7 +1043,6 @@ cmd_emer_reset(struct vsctl_context *ctx) const struct ovsrec_sflow *sflow, *next_sflow; /* Reset the Open_vSwitch table. */ - ovsrec_open_vswitch_set_managers(ctx->ovs, NULL, 0); ovsrec_open_vswitch_set_manager_options(ctx->ovs, NULL, 0); ovsrec_open_vswitch_set_ssl(ctx->ovs, NULL); @@ -1898,7 +1896,6 @@ verify_managers(const struct ovsrec_open_vswitch *ovs) { size_t i; - ovsrec_open_vswitch_verify_managers(ovs); ovsrec_open_vswitch_verify_manager_options(ovs); for (i = 0; i < ovs->n_manager_options; ++i) { @@ -1911,7 +1908,6 @@ verify_managers(const struct ovsrec_open_vswitch *ovs) static void pre_manager(struct vsctl_context *ctx) { - ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_managers); ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_manager_options); ovsdb_idl_add_column(ctx->idl, &ovsrec_manager_col_target); } @@ -1928,12 +1924,6 @@ cmd_get_manager(struct vsctl_context *ctx) /* Print the targets in sorted order for reproducibility. */ svec_init(&targets); - /* First, add all targets found in deprecated 'managers' column. */ - for (i = 0; i < ovs->n_managers; i++) { - svec_add(&targets, ovs->managers[i]); - } - - /* Second, add all targets pointed to by 'manager_options' column. */ for (i = 0; i < ovs->n_manager_options; i++) { svec_add(&targets, ovs->manager_options[i]->target); } @@ -1951,9 +1941,6 @@ delete_managers(const struct vsctl_context *ctx) const struct ovsrec_open_vswitch *ovs = ctx->ovs; size_t i; - /* Delete manager targets in deprecated 'managers' column. */ - ovsrec_open_vswitch_set_managers(ovs, NULL, 0); - /* Delete Manager rows pointed to by 'manager_options' column. */ for (i = 0; i < ovs->n_manager_options; i++) { ovsrec_manager_delete(ovs->manager_options[i]); @@ -1978,9 +1965,6 @@ insert_managers(struct vsctl_context *ctx, char *targets[], size_t n) struct ovsrec_manager **managers; size_t i; - /* Store in deprecated 'manager' column. */ - ovsrec_open_vswitch_set_managers(ctx->ovs, targets, n); - /* Insert each manager in a new row in Manager table. */ managers = xmalloc(n * sizeof *managers); for (i = 0; i < n; i++) { diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 197b6ed4..c2c4579c 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -526,13 +526,10 @@ collect_in_band_managers(const struct ovsrec_open_vswitch *ovs_cfg, struct shash targets; size_t i; - /* Collect all of the potential targets, as the union of the "managers" - * column and the "targets" columns of the rows pointed to by - * "manager_options", excluding any that are out-of-band. */ + /* Collect all of the potential targets from the "targets" columns of the + * rows pointed to by "manager_options", excluding any that are + * out-of-band. */ shash_init(&targets); - for (i = 0; i < ovs_cfg->n_managers; i++) { - shash_add_once(&targets, ovs_cfg->managers[i], NULL); - } for (i = 0; i < ovs_cfg->n_manager_options; i++) { struct ovsrec_manager *m = ovs_cfg->manager_options[i]; diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema index e15925ec..3537d287 100644 --- a/vswitchd/vswitch.ovsschema +++ b/vswitchd/vswitch.ovsschema @@ -1,6 +1,6 @@ {"name": "Open_vSwitch", - "version": "1.3.1", - "cksum": "557026156 15739", + "version": "2.0.0", + "cksum": "4107852581 15651", "tables": { "Open_vSwitch": { "columns": { @@ -8,8 +8,6 @@ "type": {"key": {"type": "uuid", "refTable": "Bridge"}, "min": 0, "max": "unlimited"}}, - "managers": { - "type": {"key": "string", "min": 0, "max": "unlimited"}}, "manager_options": { "type": {"key": {"type": "uuid", "refTable": "Manager"}, diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index c80e8cdb..328cf354 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -273,21 +273,6 @@ connection should be configured. See the table for more information. - - -

- Remote database clients to which the Open vSwitch's database server - should connect or to which it should listen. Adding an OVSDB target - to this set is equivalent to adding it to with all of the default options. -

- -

- Use of this column is deprecated and may be removed sometime in the - future. New applications should use and set instead. -

-
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index cbd2eee1..13b9d40a 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -79,7 +79,7 @@ esac : ${FORCE_COREFILES:=y} # Config variables specific to ovsdb-server -: ${OVSDB_SERVER_REMOTES:=punix:/var/run/openvswitch/db.sock db:Open_vSwitch,managers db:Open_vSwitch,manager_options} +: ${OVSDB_SERVER_REMOTES:=punix:/var/run/openvswitch/db.sock db:Open_vSwitch,manager_options} : ${OVSDB_SERVER_DB:=/etc/openvswitch/conf.db} : ${OVSDB_SERVER_PIDFILE:=/var/run/openvswitch/ovsdb-server.pid} : ${OVSDB_SERVER_RUN_DIR:=/var/xen/openvswitch} diff --git a/xenserver/usr_share_openvswitch_scripts_sysconfig.template b/xenserver/usr_share_openvswitch_scripts_sysconfig.template index e72f6957..2636588b 100644 --- a/xenserver/usr_share_openvswitch_scripts_sysconfig.template +++ b/xenserver/usr_share_openvswitch_scripts_sysconfig.template @@ -21,7 +21,7 @@ # OVSDB_SERVER_REMOTES: Space-separated list of methods on which to have # ovsdb-server listen or connect for a JSON-RPC connection. -# OVSDB_SERVER_REMOTES="punix:/var/run/openvswitch/db.sock db:Open_vSwitch,managers db:Open_vSwitch,manager_options" +# OVSDB_SERVER_REMOTES="punix:/var/run/openvswitch/db.sock db:Open_vSwitch,manager_options" # OVSDB_SERVER_DB: File for which ovsdb-server uses for storage. # OVSDB_SERVER_DB=/etc/openvswitch/conf.db -- 2.30.2