Commit Graph

103 Commits (72c7a90b55a3d233b32f133fcaf631a076e76e04)

Author SHA1 Message Date
Russell Bryant 92952f0165 Clarify that native L3 is always used.
Remove all remaining remnants of L3 agent support.

Change-Id: Ia9e97837e6eb1a23435f2def74060032ce0e5409
Closes-bug: 1626717
Signed-off-by: Russell Bryant <rbryant@redhat.com>
6 years ago
Tong Liu ce0b830525 Resolve create_nova_conf_neutron not found issue
On OVN compute node, only n-cpu service is enabled. Thus, some
library codes are not sourced and create_nova_conf_neutron could
not be found during nova setup. Source the neutron-legacy in
plugin.sh.

Change-Id: I776c34da11b4a9464076f712821f99276d9e3ea2
Closes-Bug: #1653835
6 years ago
Babu Shanmugam 5d87c8acf6 Moving functions from devstack/plugin.sh to a library file
When we write a grenade plugin, we need most of the functions
in plugin.sh. Hence moving the functions to a library, it will
enable both the plugin functionalities to operate on the same library.

Change-Id: Idf37e1561318dcf84e89b402c0be3ac4b3cfc266
7 years ago
Jenkins c230897698 Merge "Remove 'origin/' in OVN_BRANCH" 7 years ago
chen-li 57a9538db2 Remove 'origin/' in OVN_BRANCH
When use origin/master, if we re-installed the
devstack with a RECLONE=True, an error will happen
with the error message:
  [ERROR] /opt/stack/devstack/functions-common:560 origin/master is neither branch nor tag

Use the branch name without 'origin/' works the same.

Change-Id: I89008b92e0ec355c36c7ae969e3cb97cd0517d97
7 years ago
Richard Theis f1a41996bd Remove unneeded /etc/neutron/dnsmasq.conf configuration
The /etc/neutron/dnsmasq.conf configuration file isn't needed to
set the MTU option. This is now done by the ML2 framework via
various MTU configuration options (e.g. max_header_size option
for geneve tenant networks).

Change-Id: I26c86f803d51758e1cbb4a7f12ae70ed742ef040
Related-Bug: #1588966
7 years ago
Richard Theis c6461e61ab Support geneve tenant network type
Update the OVN DevStack plugin to use the geneve tenant network
type. This includes related install documentation updates for
ml2_conf.ini.

This patch set also validates network creation precommit. The
validation will ensure a valid network type is used and that
a multi-provider network isn't created (they will be supported
with routed networks).

A follow-on patch set will support vlan tenant network type.

Depends-On: Id75651dfe57a07045a6932a0369668f33c7eef09
Change-Id: I3e25999b24c23413596f1a95f22f794712814ce8
Partial-Bug: #1588966
7 years ago
Richard Theis d1346339be Support ML2 option to enable security groups
Add support for the ML2 enable_security_group option under [securitygroup]
in ml2_conf.ini. This option is set to True by default and will control
whether or not ACLs are applied to ports and the port binding value for
CAP_PORT_FILTER.

Also, update devstack plugin to set enable_security_group based on
Q_USE_SECGROUP and comment out firewall_driver since it isn't used by OVN.

And finally, add the security group options to the neutron-ovn-db-sync-util
command.

Change-Id: I73ca9a34ea34f781cbec5680b44e98da309365bb
Closes-Bug: #1588935
7 years ago
Richard Theis a6ff3490c4 Use ml2_conf.ini for OVN configuration options
The conversion from core plugin to ML2 mechanism driver
resulted in the OVN configuration options moving from
/etc/neutron/plugins/networking-ovn/networking-ovn.ini to
/etc/neutron/neutron.conf. The OVN configuration options
should have been moved to the ML2 configuration file
(/etc/neutron/plugins/ml2/ml2_conf.ini) like is done for
the ML2 OVS options.

In addition, "tox -e genconfig" was updated to generate
an ML2 configuration file with OVN configuration options.

Change-Id: I4bcfc075a3805c8af4e845c89ba0fd81fb49474d
Closes-Bug: #1589205
7 years ago
Jenkins b3158d0a4c Merge "Get information of Chassis from OVN SB DB" 7 years ago
Richard Theis 219dd4b959 Fix gate-tempest-dsvm-networking-ovn-native-l3-nv job
The gate-tempest-dsvm-networking-ovn-native-l3-nv job is broken due
to changes made by [1].  DevStack now handles L3 network resource
setup (i.e. public network and router) based on the "router" and
"external-net" neutron extensions rather than relying on the q-l3
service being enabled.  As a result, we can remove some of the code
copied from DevStack by [2].

[1] https://review.openstack.org/#/c/318145/
[2] https://review.openstack.org/#/c/304859/

Change-Id: I6a04cd206821348306fe375d23d460f963c617b4
Closes-Bug: #1590113
7 years ago
lzklibj c5a0860f13 Get information of Chassis from OVN SB DB
This patch does the following things:
1) Introduces a method to query chassis info(hostname, physnets)
from OVN_SouthBound DB.
2) Introduces an event to match Chassis record creating, deleting
and updating event.
3) Initialize the connection to ovn sb db at startup.
4) Renames the OvsdbOvnIdl class to OvsdbNbOvnIdl.

TODO(Will be in following patches):
Update the neutron DB when getting information.

Partially-implements: blueprint routed-networks
Change-Id: If372fd6a690f4bd4edfff77827f363472b57540a
Co-Authored-By: Hong Hui Xiao <xiaohhui@cn.ibm.com>
Co-Authored-By: Kyle Mestery <mestery@mestery.com>
7 years ago
Kyle Mestery 16d080c76f Vagrant: Add support for running a HW VTEP node
This commit adds support to the networking-ovn Vagrant setup to run the
HW VTEP emulator on a separate Vagrant box. Note this new VM is not
started by default.

Change-Id: I5d74daa8b4345248c369e6a8ec7599968e50d2c8
7 years ago
Kyle Mestery 2cfb7e8733 devstack: Add support for running the vtep emulator
This commit adds support to the networking-ovn devstack infrastructure to
run the HW VTEP emulator. A sample vtep-local.conf.sample is provided
showing how this is done.

Change-Id: Idb4bcdbd1286ff513a3b491e50ffe619cb6a9d6d
Signed-off-by: Kyle Mestery <mestery@mestery.com>
7 years ago
Richard Theis d6c544c449 Convert core plugin to ML2 mechanism driver
This patch set converts networking-ovn from a core
plugin to an ML2 mechanism driver.

This patch set completes the following conversion work:
- DevStack and Vagrant deployment updates for ML2
- Documentation and release note updates for ML2
- Removes core plugin code and refactors remaining code
  over to ML2 mechanism driver

The conversion work remains:
- Resolve the ML2 unit test TODOs
- Resolve concerns about ML2 mechanism driver _ovn
  property raised in [1].

[1] https://review.openstack.org/#/c/323460/

Co-Authored-By: Richard Theis <rtheis@us.ibm.com>
Co-Authored-By: John Kasperski <jckasper@us.ibm.com>

Change-Id: Iffa596baa5c7520c1ca5ecddaab790c52e761460
Closes-Bug: #1578198
Closes-Bug: #1550278
7 years ago
John Kasperski e508ea2d2e Add QoS support to ML2 driver
Add QoS support to the OVN ML2 mechanism driver.  Since OVN does not
have an neutron L2 agent, the Qos agent extension driver framework can
not be used.

All of the QoS logic has been moved out of the mechanism driver and into
a separate module to make it easier to maintain.

Done/tested:
 - Create port with qos policy
 - Update port with qos policy
 - Update network with qos policy
 - Update qos policy
 - Unit tests

Change-Id: I888d86f00a53ba6d204905fe69cbae7bc1d3f9da
Partial-Bug: #1578198
7 years ago
Richard Theis 3dcc3398e3 Add initial ML2 mechanism driver support
This patch set adds the initial ML2 mechanism driver
suport while maintaining the core plugin support.
Deployments will continue to use the core plugin
by default. However, the core plugin will be removed
as part of a follow-on patch set which will complete
the conversion to ML2. In the meantime, dual maintenance
will be required once this patch merges.

This patch set supports the following:
- ML2 create, update, delete network
- ML2 create, update, delete subnet
- ML2 create, update, bind, delete port
- ML2 segments
- OVN worker and logical port events
- Security group callbacks and OVN ACLs
- L3 create, update, delete router
- L3 add and remove router interface
- Basic unit tests for ML2 and ACLs

A follow-on patch set will complete the remaining
conversion work which includes the following:
- DevStack and Vagrant deployment updates for ML2
- Documentation and release note updates for ML2
- OVN DB sync support
- QoS support
- Additional unit tests

Co-Authored-By: Richard Theis <rtheis@us.ibm.com>
Co-Authored-By: John Kasperski <jckasper@us.ibm.com>

Change-Id: I6143be464d4897b9fb22837797347746d82c41b0
Partial-Bug: #1578198
7 years ago
yaowei 867b42d9a3 Switch to use setup_develop of devstack
Current codebas use setup_package installing networking-ovn to /usr/lib,
it is difficult to develop and unlike other openstack project(nova,
neutron).

Switch to use setup_develop, which create a link to
/opt/stack/networking-ovn insead of installing it:

        /usr/lib/python2.7/site-packages/networking-ovn.egg-link

Change-Id: I19863b663e7b5af5e0d606c2d6489acceb23fe45
Closes-Bug: #1579453
7 years ago
Brad Behle 12e5bb646a Create bridge for OVN L3 in devstack
When OVN is used for L3 routing in devstack, create the public
network, subnets, router, and also create the public bridge br-ex.
This is meant to be equivalent to what happens in devstack when the
L3 agent is enabled.  I hoped to do this by creating a flag that
could be set by plugins that would trigger the devstack code that
already exists to do this, but that approach was rejected (see
https://review.openstack.org/#/c/304871/).  So, the next best thing
is to copy that code from devstack into the networking-ovn devstack
plugin, which is what I did here.

Change-Id: I7e17b9f9f967a2625aa81b9dfb50739567cc223c
Closes-Bug: #1567068
7 years ago
Richard Theis 9423fcafc0 DevStack: Fix stack.sh when OFFLINE=True
Running stack.sh with OFFLINE=True will fail with the following
error: "openvswitch-switch: unrecognized service"

This patch set fixes this problem by allowing the OVN plugin
to skip the default OVS install done by DevStack. This was done
by ensuring the OVN plugin doesn't override its own defaults.
This patch set also ensures install_ovn is called when
OFFLINE=True because DevStack will honor OFFLINE within the
common install functions.

Change-Id: I3526d7e77e29da9221c16e5ae35b1a08cc8c3457
Closes-Bug: #1537981
7 years ago
Russell Bryant 96877841ab devstack: Use more OVN default paths.
There were several places in our plugin where we were specifying full
paths that were just the defaults.  Trim things down to only specify
what we have to specify.

There's a couple other fixes and cleanups included here as well.
.bash_profile updating was broken because it used an old variable that
doesn't exist anymore.  DB_.*_PORT values were also broken due to a
recent change in OVN.

Change-Id: I18d661ac46267bbd8d2bdedf439a9b0e7fd15b2c
Closes-bug: #1563707
Signed-off-by: Russell Bryant <rbryant@redhat.com>
7 years ago
Jenkins b279960912 Merge "Start ovn-northd in the devstack screen as a foreground process" 7 years ago
Amitabha Biswas 478e705ced Start ovn-northd in the devstack screen as a foreground process
A side-effect of separate ovsdb-server processors handling NB and SB
for default devstack (https://review.openstack.org/#/c/276364/) is
the use of ovn-ctl start_northd command to spawn the ovn-northd
process. The functionality of the devstack setup is correct, but in
the screen associated with the ovn-northd process, the output seen
is the following:

>> & echo $! >/opt/stack/status/stack/ovn-northd.pid; fg || \
     echo "ovn-northd failed to start" | \
     tee "/opt/stack/status/stack/ovn-northd.failure"
bash: syntax error near unexpected token `&'
>>

The ovn-northd process is actually spawned correctly and can be seen
in the output of ps. The start_northd creates ovn-northd as a daemon
and as a result the screen associated with ovn-northd doesn't have
a handle to the process.

This patch starts the ovn-northd as a foreground process in the
devstack screen. It also provides some simple command line options
associated with start_northd command in the documentation for a
non-devstack use case.

Change-Id: Ib5921fb7ba9efa0b5cf4cc8c99897473628dfae9
7 years ago
Li, Chen 253ac1dc8c Add Provider Network enabling for devstack
This change allow users to enable provider network when they use devstack.
A provider network will be created instead of the default private network.
In a multi node set up, user still need to add the physical interface to
provider bridge by hand.

Change-Id: I74bc673e99fcc18fa2ecdf903d80cb1b6e57250a
7 years ago
RYAN D. MOATS 35398d6ee8 Handle OVN NB and SB databases with separate ovsdb-server procs
To help with scale issues, default devstack to use ovn-ctl to
spawn separate ovsdb-server processes for the ovn databases and
to spawn ovn-northd.  As a side effect, there will be three
ovsdb-server processes running on an AIO node (the third process
serves the openvswitch configuration db)

Closes-Bug: 1542005

Change-Id: Iaa04cbe0dcf9661c9ee23f4f94e3db795b08c167
Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com>
7 years ago
Jenkins 9134a92e06 Merge "Use "https" instead of "http" in the default URL for OVN_REPO" 7 years ago
chen-li 1d269c3d7a Use "https" instead of "http" in the default URL for OVN_REPO
In some network enviroment, the currenrt default URL do not work:
git clone http://github.com/openvswitch/ovs.git
Cloning into 'ovs'...
fatal: unable to access 'http://github.com/openvswitch/ovs.git/': Empty reply from server

Change-Id: I7f5efacc436975c5c2360d55f46793506197b47c
7 years ago
Russell Bryant 6b9d0fff2d Update supported API extensions for tempest.
I noticed in a tempest log that it thought security groups were
disabled.  This is because our list of enabled API extensions for the
tempest config was not up to date.  Sort the list in the plugin and
update the devstack plugin to always use the same list as the plugin.

Change-Id: I92ecb4b21a5581a925c164953df0710ead5eb402
Signed-off-by: Russell Bryant <rbryant@redhat.com>
7 years ago
Flavio Fernandes 167b1bea6e Replace infinite while loop with test_with_retry
Replace while loops in plugin.sh where devstack for ovn would
wait for a certain condition to be met. Using test_with_retry
from functions, we save a few lines and get a better sense of
how long the expected condition took to happen (via time_start)
as well as avoid the risk of waiting forever.

Change-Id: I213e7721c421b16093a7426c48c94e001ba745ff
7 years ago
RYAN D. MOATS b28350b4a3 Change ovn-northd invocation to single log
The current invocation of ovn-northd in devstack/plugin.sh results
in double logging, so use the log-file default.

Change-Id: Ie6c72188985b2a5873eafe575b6ee5ff3eb7f355
Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com>
7 years ago
Jenkins 1d8d9d2384 Merge "DevStack: Adjust MTU value for GENEVE" 7 years ago
Matthew Kassawara 1121b3206f DevStack: Adjust MTU value for GENEVE
Adjust MTU value for neutron networks using the GENEVE
overlay protocol from 42 to 58 bytes.

Change-Id: If0d8e6e515e187705f5674f99f8caa6b06af1c65
7 years ago
Gal Sagie b8dee8f126 Change OVN_L3_MODE default to True
Depends-On: 3c1657eca450d82eadcb545c535047c58cf3744c
Change-Id: Ief00cbefaec4fc531994da362120cc25a88d172b
7 years ago
Jenkins 78c0a29178 Merge "Enabling qos support through Logical_Port.options" 7 years ago
Matthew Kassawara 546d34aa68 DevStack: Support disabling all OVN services
1) Support disabling all OVN services (ovn-controller and
   ovn-northd) on nodes that do not require them.
2) Build the OVN plug-in on nodes that run the neutron server
   (q-svc) service.
3) Set the OVN_NB_DB and OVN_SB_DB environment variables so
   all nodes can run OVN commands.

Change-Id: Ideb30b96ecb3fad0dbe1df1d1bded1127825d196
7 years ago
Babu Shanmugam f220cb04e0 Enabling qos support through Logical_Port.options
One has to enable qos service_plugins to work with this feature

Closes-bug: #1457588
Change-Id: I2423fb56f4c04dfcc02c9103d025cafef7925f02
7 years ago
Russell Bryant 1fc9b00766 devstack: Source ovs devstack lib later.
Source lib/ovs from Neutron just before we need it.  Previously, we were
sourcing it before Neutron may have been installed, causing our devstack
plugin to fail.

Change-Id: If42cd64bc3ebd3a5c851049818b8ae0ca301704a
Signed-off-by: Russell Bryant <rbryant@redhat.com>
7 years ago
Jakub Libosvar cfd242858b Use compile_ovs() from Neutron tree
As Neutron will compile OVS too, we can share the code between projects
and re-use it.

Change-Id: Ia37da1744707e00e570c4b772a25e537388e66e2
Depends-On: I60825c884e4d64aab2abc11d8da9bc1979baf0de
7 years ago
Jenkins d3d40a97c8 Merge "Use uppercase 'S' in word "OpenStack"" 7 years ago
Matthew Kassawara 769fc002b9 Devstack: Add native MTU option
Add option to indicate MTU of native (underlying) physical
network infrastructure. Also include some temporary munge
to calculate MTU for instances on self-service/private
networks while accounting for GENEVE protocol overhead of
42 bytes.

Change-Id: If6e636f9b4185adb78514454fe8271750696853d
7 years ago
venkatamahesh 011dd5c792 Use uppercase 'S' in word "OpenStack"
Change-Id: Ide67c059134118df6714f5f9e45532da0d6b183f
7 years ago
RYAN D. MOATS b4802b61b8 Add msec resolution to ovn-northd console logs.
Now that ovn-northd logs to the console for screen, add the pattern
that sets the log timestamp resolution to include milliseconds.

Change-Id: I84be5147dca54905296fafe14c81b9a949e6e166
Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com>
7 years ago
RYAN D. MOATS 2b81265391 Make OVS related logs multi-stack friendly
Set up ovsdb-server to log to /opt/stack/logs under devstack.

Added various descriptive notes about why things are done
the way they currently are and possible future improvements.

Change-Id: Ic96fe6678370913cb7d96e1b1f50fef50ea3c186
Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com>
7 years ago
Jenkins 8b8f8be2c5 Merge "Expose ovs-vswitchd log to file" 7 years ago
Jenkins 2530a7dfc7 Merge "Vagrant: Completely redo the Vagrant configuration" 7 years ago
Jenkins 0de287e696 Merge "devstack: Move tox install." 7 years ago
Jenkins 717366e284 Merge "Devstack: cleanup datapath" 7 years ago
Kyle Mestery 3aba78e52d Vagrant: Completely redo the Vagrant configuration
This is a fundamental change to the networking-ovn Vagrant configuration.
It does the following:

* Adds another Vagrant node to run ovn-northd and the central OVN DBs.
* Add swap space to each Vagrant node.
* Provisions another host only interface on each Vagrant node and sets
  up a provider network to make use of this.
* Sets promiscuous mode on the third NIC of each Vagrant box. This is
  required to get provider networks working.
* Configures devstack on each node to set OVN_REMOTE to the IP address
  of the ovn-db node.

In addition, it makes some changes to OVN devstack:

* Enables OVN_L3 mode by default.
* Bumps the max FDs that ovs-vswitchd can have open to 32000.

This change allows for the succesful running of OVN tests found here [1],
which create 2400 networks, 2400 subnets, 4800 ports, and 1200 routers.

[1] https://github.com/mestery/openstack-scripts/tree/master/ovn

Change-Id: I787b387f4b23ad7311be02917d6875d3b9a9ff3a
Signed-off-by: Kyle Mestery <mestery@mestery.com>
7 years ago
RYAN D. MOATS 6329d6b999 Run northd and ovn-controller with --pidfile
Having PID files allows ovs-appctl to work.

Change-Id: I011900085606f235055894f7771d11bd1b29707b
Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com>
7 years ago
Dustin Lundquist c463c669a1 Devstack: cleanup datapath
Presently ./unstack.sh; ./stack.sh fails because the kernel module is
in use and can not be unloaded. This adds stop_ovs_dp function which
removes all Open vSwitch datapaths and unloads the kernel modules, so
the kernel modules can be reloaded.

Change-Id: Id89acedf747430617cf616e6f8d2789a05bb0ec7
7 years ago