diff options
author | Russell Bryant <rbryant@redhat.com> | 2015-04-16 17:13:54 -0400 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-04-16 16:47:58 -0700 |
commit | 91ae206597a8944fe0d3a1d9ef1133f90f5e5c1c (patch) | |
tree | 7de41a0724f55cafa6eff0105364b0b42436335d | |
parent | 1d4e6b55b50ce8455ff94593f18ef84a25a24680 (diff) | |
download | openvswitch-91ae206597a8944fe0d3a1d9ef1133f90f5e5c1c.tar.gz |
ovn: Rename ovn-nbd to ovn-northd.
It came up in a recent discussion that the use of 'nbd' could cause
confusion since nbd is used for "Network Block Device", which may be
used in many of the same environments that OVN would be used in.
To avoid the possible issue, just rename ovn-nbd to ovn-northd.
While we're at it, create a subdirectory under ovn/ to hold all files
related to ovn-northd. For now it's just a single C file, but we
may add more source files in the future.
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | ovn/.gitignore | 1 | ||||
-rw-r--r-- | ovn/TODO | 6 | ||||
-rw-r--r-- | ovn/automake.mk | 6 | ||||
-rw-r--r-- | ovn/northd/.gitignore | 1 | ||||
-rw-r--r-- | ovn/northd/automake.mk | 4 | ||||
-rw-r--r-- | ovn/northd/ovn-northd.c (renamed from ovn/ovn-nbd.c) | 18 | ||||
-rw-r--r-- | ovn/ovn-architecture.7.xml | 62 | ||||
-rw-r--r-- | ovn/ovn-nb.xml | 10 | ||||
-rw-r--r-- | ovn/ovn-sb.xml | 8 | ||||
-rwxr-xr-x | tutorial/ovs-sandbox | 12 |
10 files changed, 65 insertions, 63 deletions
diff --git a/ovn/.gitignore b/ovn/.gitignore index cbd65a1fb..8f6a63145 100644 --- a/ovn/.gitignore +++ b/ovn/.gitignore @@ -13,4 +13,3 @@ /ovn-sb-idl.ovsidl /ovn-nbctl /ovn-nbctl.8 -/ovn-nbd @@ -2,7 +2,7 @@ ovn-controller is the primary user of flow match expressions, but the same syntax and I imagine the same code ought to be useful in - ovn-nbd for ACL match expressions. + ovn-northd for ACL match expressions. * ovn-controller @@ -118,7 +118,7 @@ Can probably get this from Open_vSwitch database. -* ovn-nbd +* ovn-northd ** Monitor OVN_Northbound database, trigger Pipeline recomputation on change. @@ -234,7 +234,7 @@ No details yet. -** Init scripts for ovn-controller (on HVs), ovn-nbd, OVN DB server. +** Init scripts for ovn-controller (on HVs), ovn-northd, OVN DB server. ** Distribution packaging. diff --git a/ovn/automake.mk b/ovn/automake.mk index 1609d7009..672ef3fc4 100644 --- a/ovn/automake.mk +++ b/ovn/automake.mk @@ -123,10 +123,6 @@ bin_PROGRAMS += ovn/ovn-nbctl ovn_ovn_nbctl_SOURCES = ovn/ovn-nbctl.c ovn_ovn_nbctl_LDADD = ovn/libovn.la ovsdb/libovsdb.la lib/libopenvswitch.la -# ovn-nbd -bin_PROGRAMS += ovn/ovn-nbd -ovn_ovn_nbd_SOURCES = ovn/ovn-nbd.c -ovn_ovn_nbd_LDADD = ovn/libovn.la ovsdb/libovsdb.la lib/libopenvswitch.la - include ovn/controller/automake.mk include ovn/lib/automake.mk +include ovn/northd/automake.mk diff --git a/ovn/northd/.gitignore b/ovn/northd/.gitignore new file mode 100644 index 000000000..c0a87abd9 --- /dev/null +++ b/ovn/northd/.gitignore @@ -0,0 +1 @@ +/ovn-northd diff --git a/ovn/northd/automake.mk b/ovn/northd/automake.mk new file mode 100644 index 000000000..c9c64c0f7 --- /dev/null +++ b/ovn/northd/automake.mk @@ -0,0 +1,4 @@ +# ovn-northd +bin_PROGRAMS += ovn/northd/ovn-northd +ovn_northd_ovn_northd_SOURCES = ovn/northd/ovn-northd.c +ovn_northd_ovn_northd_LDADD = ovn/libovn.la ovsdb/libovsdb.la lib/libopenvswitch.la diff --git a/ovn/ovn-nbd.c b/ovn/northd/ovn-northd.c index 27e90c60d..241d6ec2a 100644 --- a/ovn/ovn-nbd.c +++ b/ovn/northd/ovn-northd.c @@ -196,7 +196,7 @@ set_bindings(struct nbd_context *ctx) static void ovnnb_db_changed(struct nbd_context *ctx) { - VLOG_DBG("ovn-nbd: ovn-nb db contents have changed.\n"); + VLOG_DBG("ovn-northd: ovn-nb db contents have changed.\n"); set_bindings(ctx); } @@ -369,7 +369,7 @@ main(int argc, char *argv[]) ctx.ovnnb_idl = ovnnb_idl = ovsdb_idl_create(ovnnb_db, &nbrec_idl_class, true, true); - /* There is only a small subset of changes to the ovn-sb db that ovn-nbd + /* There is only a small subset of changes to the ovn-sb db that ovn-northd * 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); @@ -386,7 +386,7 @@ main(int argc, char *argv[]) * db must be recalculated. * * If the contents of the ovn-sb db change, it means the 'up' state of - * a port may have changed, as that's the only type of change ovn-nbd is + * a port may have changed, as that's the only type of change ovn-northd is * watching for. */ @@ -425,10 +425,10 @@ main(int argc, char *argv[]) /* * If there are any pending changes, we delay recalculating the * necessary updates until after an existing transaction finishes. - * This avoids the possibility of rapid updates causing ovn-nbd to never - * be able to successfully make the corresponding updates to the other - * db. Instead, pending changes are batched up until the next time we - * get a chance to calculate the new state and apply it. + * This avoids the possibility of rapid updates causing ovn-northd to + * never be able to successfully make the corresponding updates to the + * other db. Instead, pending changes are batched up until the next + * time we get a chance to calculate the new state and apply it. */ if (ovnnb_changes_pending && !ctx.ovnsb_txn) { @@ -438,7 +438,7 @@ main(int argc, char *argv[]) */ ctx.ovnsb_txn = ovsdb_idl_txn_create(ctx.ovnsb_idl); ovsdb_idl_txn_add_comment(ctx.ovnsb_txn, - "ovn-nbd: northbound db changed"); + "ovn-northd: northbound db changed"); ovnnb_db_changed(&ctx); ovnnb_changes_pending = false; } @@ -450,7 +450,7 @@ main(int argc, char *argv[]) */ ctx.ovnnb_txn = ovsdb_idl_txn_create(ctx.ovnnb_idl); ovsdb_idl_txn_add_comment(ctx.ovnnb_txn, - "ovn-nbd: southbound db changed"); + "ovn-northd: southbound db changed"); ovnsb_db_changed(&ctx); ovn_changes_pending = false; } diff --git a/ovn/ovn-architecture.7.xml b/ovn/ovn-architecture.7.xml index 69a88743a..9ed162b3b 100644 --- a/ovn/ovn-architecture.7.xml +++ b/ovn/ovn-architecture.7.xml @@ -103,13 +103,13 @@ <p> The OVN Northbound Database has only two clients: the OVN/CMS Plugin - above it and <code>ovn-nbd</code> below it. + above it and <code>ovn-northd</code> below it. </p> </li> <li> - <code>ovn-nbd</code>(8) connects to the OVN Northbound Database above it - and the OVN Southbound Database below it. It translates the + <code>ovn-northd</code>(8) connects to the OVN Northbound Database + above it and the OVN Southbound Database below it. It translates the logical network configuration in terms of conventional network concepts, taken from the OVN Northbound Database, into logical datapath flows in the OVN Southbound Database below it. @@ -118,7 +118,7 @@ <li> <p> The <dfn>OVN Southbound Database</dfn> is the center of the system. - Its clients are <code>ovn-nbd</code>(8) above it and + Its clients are <code>ovn-northd</code>(8) above it and <code>ovn-controller</code>(8) on every transport node below it. </p> @@ -129,7 +129,7 @@ logical network in terms of ``logical datapath flows,'' and <dfn>Binding</dfn> tables that link logical network components' locations to the physical network. The hypervisors populate the PN and - Binding tables, whereas <code>ovn-nbd</code>(8) populates the LN + Binding tables, whereas <code>ovn-northd</code>(8) populates the LN tables. </p> @@ -177,7 +177,7 @@ | OVN Northbound DB | | | | | | | - | ovn-nbd | + | ovn-northd | | | | +-----------|-----------+ | @@ -292,7 +292,7 @@ </li> <li> - <code>ovn-nbd</code> receives the OVN Northbound database update. + <code>ovn-northd</code> receives the OVN Northbound database update. In turn, it makes the corresponding updates to the OVN Southbound database, by adding rows to the OVN Southbound database <code>Pipeline</code> table to reflect the new port, e.g. add a @@ -306,8 +306,8 @@ <li> On every hypervisor, <code>ovn-controller</code> receives the - <code>Pipeline</code> table updates that <code>ovn-nbd</code> made in the - previous step. As long as the VM that owns the VIF is powered off, + <code>Pipeline</code> table updates that <code>ovn-northd</code> made + in the previous step. As long as the VM that owns the VIF is powered off, <code>ovn-controller</code> cannot do much; it cannot, for example, arrange to send packets to or receive packets from the VIF, because the VIF does not actually exist anywhere. @@ -337,12 +337,13 @@ <li> Some CMS systems, including OpenStack, fully start a VM only when its - networking is ready. To support this, <code>ovn-nbd</code> notices the - <code>chassis</code> column updated for the row in <code>Bindings</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 then + 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 + <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 + then react by allowing the VM's execution to proceed. </li> @@ -389,7 +390,7 @@ </li> <li> - <code>ovn-nbd</code> receives the OVN Northbound update and in turn + <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 @@ -398,9 +399,9 @@ <li> On every hypervisor, <code>ovn-controller</code> receives the - <code>Pipeline</code> table updates that <code>ovn-nbd</code> made 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 + <code>Pipeline</code> table updates that <code>ovn-northd</code> made + 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. </li> @@ -486,8 +487,8 @@ </li> <li> - <code>ovn-nbd</code> receives the OVN Northbound database update. In - turn, it makes the corresponding updates to the OVN Southbound + <code>ovn-northd</code> receives the OVN Northbound database update. + 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 @@ -498,10 +499,11 @@ <li> On every hypervisor, <code>ovn-controller</code> subscribes to the changes in the <code>Bindings</code> table. When a new row is created - by <code>ovn-nbd</code> that includes a value in <code>parent_port</code> - column of <code>Bindings</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> + by <code>ovn-northd</code> that includes a value in + <code>parent_port</code> column of <code>Bindings</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 @@ -510,7 +512,7 @@ <li> One can only start the application inside the container after the - underlying network is ready. To support this, <code>ovn-nbd</code> + underlying network is ready. To support this, <code>ovn-northd</code> notices the updated <code>chassis</code> column in <code>Bindings</code> table and updates the <ref column="up" table="Logical_Port" db="OVN_NB"/> column in the OVN Northbound database's @@ -526,7 +528,7 @@ </li> <li> - <code>ovn-nbd</code> receives the OVN Northbound update and in turn + <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 that were related to the now-destroyed @@ -536,9 +538,9 @@ <li> On every hypervisor, <code>ovn-controller</code> receives the - <code>Pipeline</code> table updates that <code>ovn-nbd</code> made in the - previous step. <code>ovn-controller</code> updates OpenFlow tables to - reflect the update. + <code>Pipeline</code> table updates that <code>ovn-northd</code> made + in the previous step. <code>ovn-controller</code> updates OpenFlow tables + to reflect the update. </li> </ol> </manpage> diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml index 14ee117e7..2d0632e2d 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -3,8 +3,8 @@ <p> This database is the interface between OVN and the cloud management system (CMS), such as OpenStack, running above it. The CMS produces almost all of - the contents of the database. The <code>ovn-nbd</code> program monitors - the database contents, transforms it, and stores it into the <ref + the contents of the database. The <code>ovn-northd</code> program + monitors the database contents, transforms it, and stores it into the <ref db="OVN_Southbound"/> database. </p> @@ -116,10 +116,10 @@ </column> <column name="up"> - This column is populated by <code>ovn-nbd</code>, rather than by the CMS - plugin as is most of this database. When a logical port is bound + 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-nbd</code> + db="OVN_Southbound" table="Bindings"/> 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 diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index 2c6017b83..e4159db66 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -11,7 +11,7 @@ architecture. It is the one component that speaks both southbound directly to all the hypervisors and gateways, via <code>ovn-controller</code>, and northbound to the Cloud Management - System, via <code>ovn-nbd</code>: + System, via <code>ovn-northd</code>: </p> <h2>Database Structure</h2> @@ -64,7 +64,7 @@ That CMS determines the entire OVN logical configuration and therefore the LN's content at any given time is a deterministic function of the CMS's configuration, although that happens indirectly via the OVN Northbound DB - and <code>ovn-nbd</code>. + and <code>ovn-northd</code>. </p> <p> @@ -629,8 +629,8 @@ <p> For every <code>Logical_Port</code> record in <code>OVN_Northbound</code> - database, <code>ovn-nbd</code> creates a record in this table. - <code>ovn-nbd</code> populates and maintains every column except + database, <code>ovn-northd</code> creates a record in this table. + <code>ovn-northd</code> populates and maintains every column except the <code>chassis</code> column, which it leaves empty in new records. </p> diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 133585e49..8aa2ddd49 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -44,7 +44,7 @@ rungdb() { gdb_vswitchd=false gdb_ovsdb=false -gdb_ovn_nbd=false +gdb_ovn_northd=false gdb_ovn_controller=false builddir= srcdir= @@ -94,7 +94,7 @@ These options force ovs-sandbox to use an installed Open vSwitch: -i, --installed use installed Open vSwitch -g, --gdb-vswitchd run ovs-vswitchd under gdb -d, --gdb-ovsdb run ovsdb-server under gdb - --gdb-ovn-nbd run ovn-nbd under gdb + --gdb-ovn-northd run ovn-northd under gdb --gdb-ovn-controller run ovn-controller under gdb -S, --schema=FILE use FILE as vswitch.ovsschema -o, --ovn enable OVN @@ -138,8 +138,8 @@ EOF -d|--gdb-ovsdb) gdb_ovsdb=true ;; - --gdb-ovn-nbd) - gdb_ovn_nbd=true + --gdb-ovn-northd) + gdb_ovn_northd=true ;; --gdb-ovn-controller) gdb_ovn_controller=true @@ -217,7 +217,7 @@ if $built; then fi PATH=$builddir/ovsdb:$builddir/vswitchd:$builddir/utilities:$PATH if $ovn; then - PATH=$builddir/ovn:$builddir/ovn/controller:$PATH + PATH=$builddir/ovn:$builddir/ovn/controller:$builddir/ovn/northd:$PATH fi export PATH else @@ -293,7 +293,7 @@ if $ovn; then ovs-vsctl set open . external-ids:ovn-encap-ip=127.0.0.1 ovs-vsctl add-br br-int - rungdb $gdb_ovn_nbd ovn-nbd --detach --no-chdir --pidfile -vconsole:off --log-file + rungdb $gdb_ovn_northd ovn-northd --detach --no-chdir --pidfile -vconsole:off --log-file rungdb $gdb_ovn_controller ovn-controller --detach --no-chdir --pidfile -vconsole:off --log-file fi |