bin_PROGRAMS += ovn/controller/ovn-controller
ovn_controller_ovn_controller_SOURCES = \
- ovn/controller/bindings.c \
- ovn/controller/bindings.h \
+ ovn/controller/binding.c \
+ ovn/controller/binding.h \
ovn/controller/chassis.c \
ovn/controller/chassis.h \
ovn/controller/ofctrl.c \
--- /dev/null
+/* Copyright (c) 2015 Nicira, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <config.h>
+#include "binding.h"
+
+#include "lib/sset.h"
+#include "lib/util.h"
+#include "lib/vswitch-idl.h"
+#include "openvswitch/vlog.h"
+#include "ovn/lib/ovn-sb-idl.h"
+#include "ovn-controller.h"
+
+VLOG_DEFINE_THIS_MODULE(binding);
+
+void
+binding_init(struct controller_ctx *ctx)
+{
+ ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_open_vswitch);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_open_vswitch_col_bridges);
+
+ ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_bridge);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_bridge_col_name);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_bridge_col_ports);
+
+ ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_port);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_port_col_name);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_port_col_interfaces);
+
+ ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_interface);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_interface_col_name);
+ ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_interface_col_external_ids);
+}
+
+static void
+get_local_iface_ids(struct controller_ctx *ctx, struct sset *lports)
+{
+ int i;
+
+ for (i = 0; i < ctx->br_int->n_ports; i++) {
+ const struct ovsrec_port *port_rec = ctx->br_int->ports[i];
+ const char *iface_id;
+ int j;
+
+ if (!strcmp(port_rec->name, ctx->br_int_name)) {
+ continue;
+ }
+
+ for (j = 0; j < port_rec->n_interfaces; j++) {
+ const struct ovsrec_interface *iface_rec;
+
+ iface_rec = port_rec->interfaces[j];
+ iface_id = smap_get(&iface_rec->external_ids, "iface-id");
+ if (!iface_id) {
+ continue;
+ }
+ sset_add(lports, iface_id);
+ }
+ }
+}
+
+void
+binding_run(struct controller_ctx *ctx)
+{
+ const struct sbrec_binding *binding_rec;
+ struct ovsdb_idl_txn *txn;
+ struct sset lports, all_lports;
+ const char *name;
+ int retval;
+
+ sset_init(&lports);
+ sset_init(&all_lports);
+ get_local_iface_ids(ctx, &lports);
+ sset_clone(&all_lports, &lports);
+
+ txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
+ ovsdb_idl_txn_add_comment(txn,
+ "ovn-controller: updating bindings for '%s'",
+ ctx->chassis_id);
+
+ SBREC_BINDING_FOR_EACH(binding_rec, ctx->ovnsb_idl) {
+ if (sset_find_and_delete(&lports, binding_rec->logical_port) ||
+ (binding_rec->parent_port && binding_rec->parent_port[0] &&
+ sset_contains(&all_lports, binding_rec->parent_port))) {
+ if (!strcmp(binding_rec->chassis, ctx->chassis_id)) {
+ continue;
+ }
+ if (binding_rec->chassis[0]) {
+ VLOG_INFO("Changing chassis for lport %s from %s to %s",
+ binding_rec->logical_port, binding_rec->chassis,
+ ctx->chassis_id);
+ }
+ sbrec_binding_set_chassis(binding_rec, ctx->chassis_id);
+ } else if (!strcmp(binding_rec->chassis, ctx->chassis_id)) {
+ sbrec_binding_set_chassis(binding_rec, "");
+ }
+ }
+
+ retval = ovsdb_idl_txn_commit_block(txn);
+ if (retval == TXN_ERROR) {
+ VLOG_INFO("Problem committing binding information: %s",
+ ovsdb_idl_txn_status_to_string(retval));
+ }
+
+ ovsdb_idl_txn_destroy(txn);
+
+ SSET_FOR_EACH (name, &lports) {
+ VLOG_DBG("No binding record for lport %s", name);
+ }
+ sset_destroy(&lports);
+ sset_destroy(&all_lports);
+}
+
+void
+binding_destroy(struct controller_ctx *ctx)
+{
+ int retval = TXN_TRY_AGAIN;
+
+ ovs_assert(ctx->ovnsb_idl);
+
+ while (retval != TXN_SUCCESS && retval != TXN_UNCHANGED) {
+ const struct sbrec_binding *binding_rec;
+ struct ovsdb_idl_txn *txn;
+
+ txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
+ ovsdb_idl_txn_add_comment(txn,
+ "ovn-controller: removing all bindings for '%s'",
+ ctx->chassis_id);
+
+ SBREC_BINDING_FOR_EACH(binding_rec, ctx->ovnsb_idl) {
+ if (!strcmp(binding_rec->chassis, ctx->chassis_id)) {
+ sbrec_binding_set_chassis(binding_rec, "");
+ }
+ }
+
+ retval = ovsdb_idl_txn_commit_block(txn);
+ if (retval == TXN_ERROR) {
+ VLOG_INFO("Problem removing bindings: %s",
+ ovsdb_idl_txn_status_to_string(retval));
+ }
+
+ ovsdb_idl_txn_destroy(txn);
+ }
+}
--- /dev/null
+/* Copyright (c) 2015 Nicira, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef OVN_BINDING_H
+#define OVN_BINDING_H 1
+
+struct controller_ctx;
+
+void binding_init(struct controller_ctx *);
+void binding_run(struct controller_ctx *);
+void binding_destroy(struct controller_ctx *);
+
+#endif /* ovn/binding.h */
+++ /dev/null
-/* Copyright (c) 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include "bindings.h"
-
-#include "lib/sset.h"
-#include "lib/util.h"
-#include "lib/vswitch-idl.h"
-#include "openvswitch/vlog.h"
-#include "ovn/lib/ovn-sb-idl.h"
-#include "ovn-controller.h"
-
-VLOG_DEFINE_THIS_MODULE(bindings);
-
-void
-bindings_init(struct controller_ctx *ctx)
-{
- ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_open_vswitch);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_open_vswitch_col_bridges);
-
- ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_bridge);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_bridge_col_name);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_bridge_col_ports);
-
- ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_port);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_port_col_name);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_port_col_interfaces);
-
- ovsdb_idl_add_table(ctx->ovs_idl, &ovsrec_table_interface);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_interface_col_name);
- ovsdb_idl_add_column(ctx->ovs_idl, &ovsrec_interface_col_external_ids);
-}
-
-static void
-get_local_iface_ids(struct controller_ctx *ctx, struct sset *lports)
-{
- int i;
-
- for (i = 0; i < ctx->br_int->n_ports; i++) {
- const struct ovsrec_port *port_rec = ctx->br_int->ports[i];
- const char *iface_id;
- int j;
-
- if (!strcmp(port_rec->name, ctx->br_int_name)) {
- continue;
- }
-
- for (j = 0; j < port_rec->n_interfaces; j++) {
- const struct ovsrec_interface *iface_rec;
-
- iface_rec = port_rec->interfaces[j];
- iface_id = smap_get(&iface_rec->external_ids, "iface-id");
- if (!iface_id) {
- continue;
- }
- sset_add(lports, iface_id);
- }
- }
-}
-
-void
-bindings_run(struct controller_ctx *ctx)
-{
- const struct sbrec_bindings *bindings_rec;
- struct ovsdb_idl_txn *txn;
- struct sset lports, all_lports;
- const char *name;
- int retval;
-
- sset_init(&lports);
- sset_init(&all_lports);
- get_local_iface_ids(ctx, &lports);
- sset_clone(&all_lports, &lports);
-
- txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
- ovsdb_idl_txn_add_comment(txn,
- "ovn-controller: updating bindings for '%s'",
- ctx->chassis_id);
-
- SBREC_BINDINGS_FOR_EACH(bindings_rec, ctx->ovnsb_idl) {
- if (sset_find_and_delete(&lports, bindings_rec->logical_port) ||
- (bindings_rec->parent_port && bindings_rec->parent_port[0] &&
- sset_contains(&all_lports, bindings_rec->parent_port))) {
- if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
- continue;
- }
- if (bindings_rec->chassis[0]) {
- VLOG_INFO("Changing chassis for lport %s from %s to %s",
- bindings_rec->logical_port, bindings_rec->chassis,
- ctx->chassis_id);
- }
- sbrec_bindings_set_chassis(bindings_rec, ctx->chassis_id);
- } else if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
- sbrec_bindings_set_chassis(bindings_rec, "");
- }
- }
-
- retval = ovsdb_idl_txn_commit_block(txn);
- if (retval == TXN_ERROR) {
- VLOG_INFO("Problem committing bindings information: %s",
- ovsdb_idl_txn_status_to_string(retval));
- }
-
- ovsdb_idl_txn_destroy(txn);
-
- SSET_FOR_EACH (name, &lports) {
- VLOG_DBG("No binding record for lport %s", name);
- }
- sset_destroy(&lports);
- sset_destroy(&all_lports);
-}
-
-void
-bindings_destroy(struct controller_ctx *ctx)
-{
- int retval = TXN_TRY_AGAIN;
-
- ovs_assert(ctx->ovnsb_idl);
-
- while (retval != TXN_SUCCESS && retval != TXN_UNCHANGED) {
- const struct sbrec_bindings *bindings_rec;
- struct ovsdb_idl_txn *txn;
-
- txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
- ovsdb_idl_txn_add_comment(txn,
- "ovn-controller: removing all bindings for '%s'",
- ctx->chassis_id);
-
- SBREC_BINDINGS_FOR_EACH(bindings_rec, ctx->ovnsb_idl) {
- if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
- sbrec_bindings_set_chassis(bindings_rec, "");
- }
- }
-
- retval = ovsdb_idl_txn_commit_block(txn);
- if (retval == TXN_ERROR) {
- VLOG_INFO("Problem removing bindings: %s",
- ovsdb_idl_txn_status_to_string(retval));
- }
-
- ovsdb_idl_txn_destroy(txn);
- }
-}
+++ /dev/null
-/* Copyright (c) 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#ifndef OVN_BINDINGS_H
-#define OVN_BINDINGS_H 1
-
-struct controller_ctx;
-
-void bindings_init(struct controller_ctx *);
-void bindings_run(struct controller_ctx *);
-void bindings_destroy(struct controller_ctx *);
-
-#endif /* ovn/bindings.h */
#include "util.h"
#include "ofctrl.h"
-#include "bindings.h"
+#include "binding.h"
#include "chassis.h"
#include "physical.h"
#include "pipeline.h"
ovsdb_idl_add_column(ctx.ovs_idl, &ovsrec_open_vswitch_col_external_ids);
chassis_init(&ctx);
- bindings_init(&ctx);
+ binding_init(&ctx);
pipeline_init();
get_initial_snapshot(ctx.ovs_idl);
ofctrl_clear_flows();
chassis_run(&ctx);
- bindings_run(&ctx);
+ binding_run(&ctx);
pipeline_run(&ctx);
physical_run(&ctx);
ofctrl_run(&ctx);
unixctl_server_destroy(unixctl);
pipeline_destroy(&ctx);
ofctrl_destroy();
- bindings_destroy(&ctx);
+ binding_destroy(&ctx);
chassis_destroy(&ctx);
ovsdb_idl_destroy(ctx.ovs_idl);
/* Set up flows in table 0 for physical-to-logical translation and in table
* 64 for logical-to-physical translation. */
- const struct sbrec_bindings *binding;
- SBREC_BINDINGS_FOR_EACH (binding, ctx->ovnsb_idl) {
+ const struct sbrec_binding *binding;
+ SBREC_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
/* Find the Openflow port for the logical port, as 'ofport'. If it's
* on a remote chassis, this is the OpenFlow port for the tunnel to
* that chassis (and set 'local' to false). Otherwise, if it's on the
* practical for use in an OpenFlow flow table than a UUID.
*
* 'ports' maps 'logical_port' names to 'tunnel_key' values in the OVN_SB
- * Bindings table within the logical datapath. */
+ * Binding table within the logical datapath. */
struct logical_datapath {
struct hmap_node hmap_node; /* Indexed on 'uuid'. */
struct uuid uuid; /* The logical_datapath's UUID. */
free(ldp);
}
-/* Iterates through all of the records in the Bindings table, updating the
+/* Iterates through all of the records in the Binding table, updating the
* table of logical_datapaths to match the values found in active Bindings. */
static void
ldp_run(struct controller_ctx *ctx)
simap_clear(&ldp->ports);
}
- const struct sbrec_bindings *binding;
- SBREC_BINDINGS_FOR_EACH (binding, ctx->ovnsb_idl) {
+ const struct sbrec_binding *binding;
+ SBREC_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
struct logical_datapath *ldp;
ldp = ldp_lookup(&binding->logical_datapath);
}
\f
static bool
-parents_equal(const struct sbrec_bindings *binding,
+parents_equal(const struct sbrec_binding *binding,
const struct nbrec_logical_port *lport)
{
if (!!binding->parent_port != !!lport->parent_name) {
}
static bool
-tags_equal(const struct sbrec_bindings *binding,
+tags_equal(const struct sbrec_binding *binding,
const struct nbrec_logical_port *lport)
{
if (binding->n_tag != lport->n_tag) {
struct binding_hash_node {
struct hmap_node lp_node; /* In 'lp_map', by binding->logical_port. */
struct hmap_node tk_node; /* In 'tk_map', by binding->tunnel_key. */
- const struct sbrec_bindings *binding;
+ const struct sbrec_binding *binding;
};
static bool
/*
* When a change has occurred in the OVN_Northbound database, we go through and
- * make sure that the contents of the Bindings table in the OVN_Southbound
+ * make sure that the contents of the Binding table in the OVN_Southbound
* database are up to date with the logical ports defined in the
* OVN_Northbound database.
*/
static void
set_bindings(struct northd_context *ctx)
{
- const struct sbrec_bindings *binding;
+ const struct sbrec_binding *binding;
const struct nbrec_logical_port *lport;
/*
struct hmap lp_hmap = HMAP_INITIALIZER(&lp_hmap);
struct hmap tk_hmap = HMAP_INITIALIZER(&tk_hmap);
- SBREC_BINDINGS_FOR_EACH(binding, ctx->ovnsb_idl) {
+ SBREC_BINDING_FOR_EACH(binding, ctx->ovnsb_idl) {
struct binding_hash_node *hash_node = xzalloc(sizeof *hash_node);
hash_node->binding = binding;
hmap_insert(&lp_hmap, &hash_node->lp_node,
if (!macs_equal(binding->mac, binding->n_mac,
lport->macs, lport->n_macs)) {
- sbrec_bindings_set_mac(binding,
+ sbrec_binding_set_mac(binding,
(const char **) lport->macs, lport->n_macs);
}
if (!parents_equal(binding, lport)) {
- sbrec_bindings_set_parent_port(binding, lport->parent_name);
+ sbrec_binding_set_parent_port(binding, lport->parent_name);
}
if (!tags_equal(binding, lport)) {
- sbrec_bindings_set_tag(binding, lport->tag, lport->n_tag);
+ sbrec_binding_set_tag(binding, lport->tag, lport->n_tag);
}
if (!uuid_equals(&binding->logical_datapath, &logical_datapath)) {
- sbrec_bindings_set_logical_datapath(binding,
+ sbrec_binding_set_logical_datapath(binding,
logical_datapath);
}
} else {
continue;
}
- binding = sbrec_bindings_insert(ctx->ovnsb_txn);
- sbrec_bindings_set_logical_port(binding, lport->name);
- sbrec_bindings_set_mac(binding,
+ binding = sbrec_binding_insert(ctx->ovnsb_txn);
+ sbrec_binding_set_logical_port(binding, lport->name);
+ sbrec_binding_set_mac(binding,
(const char **) lport->macs, lport->n_macs);
if (lport->parent_name && lport->n_tag > 0) {
- sbrec_bindings_set_parent_port(binding, lport->parent_name);
- sbrec_bindings_set_tag(binding, lport->tag, lport->n_tag);
+ sbrec_binding_set_parent_port(binding, lport->parent_name);
+ sbrec_binding_set_tag(binding, lport->tag, lport->n_tag);
}
- sbrec_bindings_set_tunnel_key(binding, tunnel_key);
- sbrec_bindings_set_logical_datapath(binding, logical_datapath);
+ sbrec_binding_set_tunnel_key(binding, tunnel_key);
+ sbrec_binding_set_logical_datapath(binding, logical_datapath);
/* Add the tunnel key to the tk_hmap so that we don't try to use it
* for another port. (We don't want it in the lp_hmap because that
- * would just get the Bindings record deleted later.) */
+ * would just get the Binding record deleted later.) */
struct binding_hash_node *hash_node = xzalloc(sizeof *hash_node);
hash_node->binding = binding;
hmap_insert(&tk_hmap, &hash_node->tk_node,
struct binding_hash_node *hash_node;
HMAP_FOR_EACH (hash_node, lp_node, &lp_hmap) {
hmap_remove(&lp_hmap, &hash_node->lp_node);
- sbrec_bindings_delete(hash_node->binding);
+ sbrec_binding_delete(hash_node->binding);
}
hmap_destroy(&lp_hmap);
/*
* The only change we get notified about is if the 'chassis' column of the
- * 'Bindings' table changes. When this column is not empty, it means we need to
+ * 'Binding' table changes. When this column is not empty, it means we need to
* set the corresponding logical port as 'up' in the northbound DB.
*/
static void
ovnsb_db_changed(struct northd_context *ctx)
{
struct hmap lports_hmap;
- const struct sbrec_bindings *binding;
+ const struct sbrec_binding *binding;
const struct nbrec_logical_port *lport;
struct lport_hash_node {
hash_string(lport->name, 0));
}
- SBREC_BINDINGS_FOR_EACH(binding, ctx->ovnsb_idl) {
+ SBREC_BINDING_FOR_EACH(binding, ctx->ovnsb_idl) {
lport = NULL;
HMAP_FOR_EACH_WITH_HASH(hash_node, node,
hash_string(binding->logical_port, 0), &lports_hmap) {
* has to care about, so we'll enable monitoring those directly. */
ctx.ovnsb_idl = ovnsb_idl = ovsdb_idl_create(ovnsb_db,
&sbrec_idl_class, false, true);
- ovsdb_idl_add_table(ovnsb_idl, &sbrec_table_bindings);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_logical_port);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_chassis);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_mac);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_tag);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_parent_port);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_logical_datapath);
- ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_tunnel_key);
+ ovsdb_idl_add_table(ovnsb_idl, &sbrec_table_binding);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_logical_port);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_chassis);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_mac);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_tag);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_parent_port);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_logical_datapath);
+ ovsdb_idl_add_column(ovnsb_idl, &sbrec_binding_col_tunnel_key);
ovsdb_idl_add_column(ovnsb_idl, &sbrec_pipeline_col_logical_datapath);
ovsdb_idl_omit_alert(ovnsb_idl, &sbrec_pipeline_col_logical_datapath);
ovsdb_idl_add_column(ovnsb_idl, &sbrec_pipeline_col_table_id);
software gateway. Northbound, it connects to the OVN Southbound
Database to learn about OVN configuration and status and to
populate the PN table and the <code>Chassis</code> column in
- <code>Bindings</code> table with the hypervisor's status.
+ <code>Binding</code> table with the hypervisor's status.
Southbound, it connects to <code>ovs-vswitchd</code>(8) as an
OpenFlow controller, for control over network traffic, and to the
local <code>ovsdb-server</code>(1) to allow it to monitor and
flow to recognize that packets destined to the new port's MAC
address should be delivered to it, and update the flow that
delivers broadcast and multicast packets to include the new port.
- It also creates a record in the <code>Bindings</code> table and
+ It also creates a record in the <code>Binding</code> table and
populates all its columns except the column that identifies the
<code>chassis</code>.
</li>
Interface. In response, it updates the local hypervisor's OpenFlow
tables so that packets to and from the VIF are properly handled.
Afterward, in the OVN Southbound DB, it updates the
- <code>Bindings</code> table's <code>chassis</code> column for the
+ <code>Binding</code> table's <code>chassis</code> column for the
row that links the logical port from
<code>external-ids</code>:<code>iface-id</code> to the hypervisor.
</li>
Some CMS systems, including OpenStack, fully start a VM only when its
networking is ready. To support this, <code>ovn-northd</code> notices
the <code>chassis</code> column updated for the row in
- <code>Bindings</code> table and pushes this upward by updating the
+ <code>Binding</code> table and pushes this upward by updating the
<ref column="up" table="Logical_Port" db="OVN_NB"/> column in the OVN
Northbound database's <ref table="Logical_Port" db="OVN_NB"/> table to
indicate that the VIF is now up. The CMS, if it uses this feature, can
<li>
On every hypervisor but the one where the VIF resides,
<code>ovn-controller</code> notices the completely populated row in the
- <code>Bindings</code> table. This provides <code>ovn-controller</code>
+ <code>Binding</code> table. This provides <code>ovn-controller</code>
the physical location of the logical port, so each instance updates the
OpenFlow tables of its switch (based on logical datapath flows in the OVN
DB <code>Pipeline</code> table) so that packets to and from the VIF can
On the hypervisor where the VM was powered off,
<code>ovn-controller</code> notices that the VIF was deleted. In
response, it removes the <code>Chassis</code> column content in the
- <code>Bindings</code> table for the logical port.
+ <code>Binding</code> table for the logical port.
</li>
<li>
On every hypervisor, <code>ovn-controller</code> notices the empty
- <code>Chassis</code> column in the <code>Bindings</code> table's row
+ <code>Chassis</code> column in the <code>Binding</code> table's row
for the logical port. This means that <code>ovn-controller</code> no
longer knows the physical location of the logical port, so each instance
updates its OpenFlow table to reflect that.
<code>ovn-northd</code> receives the OVN Northbound update and in turn
updates the OVN Southbound database accordingly, by removing or
updating the rows from the OVN Southbound database
- <code>Pipeline</code> table and <code>Bindings</code> table that
+ <code>Pipeline</code> table and <code>Binding</code> table that
were related to the now-destroyed VIF.
</li>
in the previous step. <code>ovn-controller</code> updates OpenFlow tables
to reflect the update, although there may not be much to do, since the VIF
had already become unreachable when it was removed from the
- <code>Bindings</code> table in a previous step.
+ <code>Binding</code> table in a previous step.
</li>
</ol>
In turn, it makes the corresponding updates to the OVN Southbound
database, by adding rows to the OVN Southbound database's
<code>Pipeline</code> table to reflect the new port and also by
- creating a new row in the <code>Bindings</code> table and
+ creating a new row in the <code>Binding</code> table and
populating all its columns except the column that identifies the
<code>chassis</code>.
</li>
<li>
On every hypervisor, <code>ovn-controller</code> subscribes to the
- changes in the <code>Bindings</code> table. When a new row is created
+ changes in the <code>Binding</code> table. When a new row is created
by <code>ovn-northd</code> that includes a value in
- <code>parent_port</code> column of <code>Bindings</code> table, the
+ <code>parent_port</code> column of <code>Binding</code> table, the
<code>ovn-controller</code> in the hypervisor whose OVN integration bridge
has that same value in <var>vif-id</var> in
<code>external-ids</code>:<code>iface-id</code>
updates the local hypervisor's OpenFlow tables so that packets to and
from the VIF with the particular VLAN <code>tag</code> are properly
handled. Afterward it updates the <code>chassis</code> column of
- the <code>Bindings</code> to reflect the physical location.
+ the <code>Binding</code> to reflect the physical location.
</li>
<li>
One can only start the application inside the container after the
underlying network is ready. To support this, <code>ovn-northd</code>
- notices the updated <code>chassis</code> column in <code>Bindings</code>
+ notices the updated <code>chassis</code> column in <code>Binding</code>
table and updates the <ref column="up" table="Logical_Port"
db="OVN_NB"/> column in the OVN Northbound database's
<ref table="Logical_Port" db="OVN_NB"/> table to indicate that the
updates the OVN Southbound database accordingly, by removing or
updating the rows from the OVN Southbound database
<code>Pipeline</code> table that were related to the now-destroyed
- CIF. It also deletes the row in the <code>Bindings</code> table
+ CIF. It also deletes the row in the <code>Binding</code> table
for that CIF.
</li>
This column is populated by <code>ovn-northd</code>, rather than by
the CMS plugin as is most of this database. When a logical port is bound
to a physical location in the OVN Southbound database <ref
- db="OVN_Southbound" table="Bindings"/> table, <code>ovn-northd</code>
+ db="OVN_Southbound" table="Binding"/> table, <code>ovn-northd</code>
sets this column to <code>true</code>; otherwise, or if the port
becomes unbound later, it sets it to <code>false</code>. This
allows the CMS to wait for a VM's (or container's) networking to
"match": {"type": "string"},
"actions": {"type": "string"}},
"isRoot": true},
- "Bindings": {
+ "Binding": {
"columns": {
"logical_datapath": {"type": "uuid"},
"logical_port": {"type": "string"},
<h3>Bindings data</h3>
<p>
- The Bindings tables contain the current placement of logical components
+ The Binding tables contain the current placement of logical components
(such as VMs and VIFs) onto chassis and the bindings between logical ports
and MACs.
</p>
</p>
<p>
- The <ref table="Bindings"/> table is currently the only Bindings table.
+ The <ref table="Binding"/> table is currently the only binding data.
</p>
<table name="Chassis" title="Physical Network Hypervisor and Gateway Information">
<column name="logical_datapath">
The logical datapath to which the logical flow belongs. A logical
datapath implements a logical pipeline among the ports in the <ref
- table="Bindings"/> table associated with it. (No table represents a
+ table="Binding"/> table associated with it. (No table represents a
logical datapath.) In practice, the pipeline in a given logical datapath
implements either a logical switch or a logical router, and
<code>ovn-northd</code> reuses the UUIDs for those logical entities from
String constants have the same syntax as quoted strings in JSON (thus,
they are Unicode strings). String constants are used for naming
logical ports. Thus, the useful values are <ref
- column="logical_port"/> names from the <ref column="Bindings"/> and
- <ref column="Gateway"/> table in a logical flow's <ref
+ column="logical_port"/> names from the <ref column="Binding"/> and
+ <ref column="Gateway"/> tables in a logical flow's <ref
column="logical_datapath"/>.
</p>
</column>
</table>
- <table name="Bindings" title="Physical-Logical Bindings">
+ <table name="Binding" title="Physical-Logical Bindings">
<p>
Each row in this table identifies the physical location of a logical
port.