60 Commits

Author SHA1 Message Date
LIU Yulong
cd3cc7e908 [L3][QoS] Agent side router gateway IP rate limit
This patch implements the L3 agent side router gateway IP rate
limit. For routers in centralized snat node (network node),
the tc rules will be set on the corresponding device in router
namespace:
    1. Legacy and HA router, qrouter-namespace and qg-device
    2. Dvr (edge) router, snat namespace and qg-device

If gateway IP rate limit was set, then under the same router,
all the VMs without floating IP will share the bandwidth.

Partially-Implements blueprint: router-gateway-ip-qos
Closes-Bug: #1757044
Change-Id: Ie92ff0d4df0e85ce71c7d50f34ea6ff973812af8
2018-12-01 17:45:47 +08:00
Hongbin Lu
f0678b9b09 Add propagate_uplink_status to port
Introduce an attribute 'propagate_uplink_status' to port.
This attribute can be implemented for VF port to indicate if the VF
link state should follow the state of the PF.

Note: ML2 extension driver loaded on request via configuration:

  [ml2]
  extension_drivers = uplink_status_propagation

Other related patches:
* neutron-lib: https://review.openstack.org/#/c/571821/
* tempest test: https://review.openstack.org/#/c/586719/
* OSC: https://review.openstack.org/#/c/586684/
* neutronclient: https://review.openstack.org/#/c/586712/

APIImpact Add 'propagate_uplink_status' attribute to 'port' resource

Change-Id: Ie8260c332e24c1880f9f82e6b6dacca8415be842
Close-Bug: #1722720
2018-11-29 19:33:16 +00:00
Zuul
b9bbaa4c5d Merge "Add port_forwarding to devstack plugin" 2018-11-22 02:11:05 +00:00
Slawek Kaplonski
4d50adb592 Add port_forwarding to devstack plugin
This commit adds possibility to configure fip port_forwarding
service plugin and l3 extension with devstack plugin.

Change-Id: If01dd1db1b4a44ba2f7e2d8f8326e331f9dc79e9
2018-11-10 00:48:52 +01:00
Lucas Alvares Gomes
cdfeeaf2bc DevStack: OVS: Only install kernel-* packages when needed
If the host OS is using an older kernel and invoke the compile_ovs
function from the DevStack OVS library (devstack/lib/ovs), that function
will try to install the kernel-dev and kernel-headers package even if
the "build_modules" parameter is set to False.

That could fail because the specific kernel-* packages for the version
of the kernel running may not be present in the distro's repository
anymore. Plus, if the kernel modules will not be compiled, there's no
reason to install such packages.

This patch is fixing this problem by using the "build_modules" parameter
as a flag to whether install or not those kernel-* packages.

Change-Id: I11af0e22d25973e6334e867ab2659fbdf9f10d86
Closes-Bug: #1802101
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2018-11-07 15:22:51 +00:00
Lucas Alvares Gomes
987e8b0cc4 Fix devstack/lib/ovs to run with Fedora 28
The patch is fixing two problems found when stacking DevStack on a
Fedora 28 host OS.

Problem 1: Account to the different patch versions between the
kernel-devel and kernel-headers packages.

Problem 2: Install the elfutils-libelf-devel package which is needed to
compile OVS.

For more a detailed information about each problem, check the bug linked
in this patch.

Closes-Bug: #1790143
Change-Id: Idfdee28124ff19272abcaaa3adade0435e3e474a
2018-08-31 15:01:05 +01:00
Stephen Finucane
626a8976e1 trivial: Fix file permissions
None of these should be executable, from what I can tell.

Side note: never backup a git repo to an NTFS drive or you lose all your
permissions and need hacks to restore them.

Change-Id: I34de5488129c575a66b38b400c31393fb511765f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-05-10 10:07:39 +00:00
LIU Yulong
6e50a77fc7 Try to enable L3 agent extension fip_qos
Adds devstack configs to try to enable the L3 agent
extension `fip_qos` by checking the API service
extension router, agent and QoS.

Once this L3 agent extension works during the devstack
zuul job installation, we can continue to run the
neutron-tempest-plugin tests for floating IP QoS.

Partially-Implements blueprint: floating-ip-rate-limit

Change-Id: Ibef48e7842a276fe77c901403d67760871f2b7e0
2018-03-01 16:42:15 +08:00
Nguyen Phuong An
b27164f0a8 [log]: Devstack plugin for logging api
This patch implements devstack plugin for logging api. The logging
api service base on logging api spec [1].

[1] https://specs.openstack.org/openstack/neutron-specs/specs/pike/logging-API-for-security-group-rules.html

Change-Id: Ib86535ad24319cb0e10a48df50651264201673c3
Depends-On: Ib8668dd25ee7c5000a6dafcc7db3dbc33ad190be
Partially-implements: blueprint security-group-logging
Related-Bug: #1468366
2017-12-19 14:40:57 +07:00
Jens Harbott
6a8f3b9b0d Add dns-integration setup to devstack plugin
This will be used in a job that will run neutron designate integration
tests from the neutron-tempest-plugin repo.

Change-Id: Ib380d8a98e991a475b20140f5c37e3747aa5fc0c
Needed-By: I9c2eadf1dc86cb60190fb22393a02ffa02770620
2017-11-22 07:50:06 +00:00
Jenkins
2b815e1209 Merge "devstack: Adapt to lib/neutron" 2017-09-06 01:06:14 +00:00
Miguel Lavalle
39a9e09716 Add API test for port dns_domain
This patchset adds a Tempest API test for the port dns_domain attribute.

It also enables the dns-domain-ports extension for testing, which is a
super-set of the dns extension.

Change-Id: I5c1da61a8a49c190aad549713da646a3abb8ccb1
2017-08-09 16:20:48 -05:00
Miguel Angel Ajo
0177568c93 devstack: fix ovs install on fedora like OS
This patch I3d0981fbe30f2436f00c200919b50aeb97491252
resolved custom kernel version, but introduced a bug
for the 3.x series. This patch avoids the replacement
in the case of the 3.x series.

Closes-Bug: #1704077

Co-Authored-By: Moshe Levi <moshele@mellanox.com>

Change-Id: Iff1c5a39fe4b0d9320910d0cfafdd36873825d03
2017-08-02 14:11:13 +00:00
Moshe Levi
7ee4d4564c stop ovs that installed from git on unstack
Change-Id: I6a30ca3e371787d147785944de61746c3cdd6046
2017-07-11 17:31:32 +03:00
Moshe Levi
908f0e4f04 devstack ovs: get correct kernel rpm version on customed kernel
When building custom kernel version
uname -r returns 4.10.0-00054-ge4cd924
but the rpm name is kernel-4.10.0_00054_ge4cd924-1.x86_64
This is because dash is illegal character in rpm version

This patch fix the kernel version is rpm based OS
but converting all the dashes to underscores

Change-Id: I3d0981fbe30f2436f00c200919b50aeb97491252
2017-07-06 13:03:31 +03:00
YAMAMOTO Takashi
895756d9b9 devstack: Adapt to lib/neutron
Change-Id: Idcb903002aec823aa1e546e8e90815ebac614e5b
2017-05-26 12:16:44 +09:00
James Anziano
2d77118771 Enable segments plugin in gate
Change-Id: I821f7c07f21a10c8a8d2b3c7e79da205b805d525
2017-05-16 16:24:15 +00:00
YAMAMOTO Takashi
38feb491dd devstack: Add neutron-sriov-agent alias for lib/neutron
Change-Id: Id6f7cf1d859f4884aae5cbb950c91e136f5be669
2017-05-08 09:25:45 +09:00
Jenkins
ec97d258d4 Merge "devstack: use neutron_service_plugin_class_add for service plugins" 2017-04-26 21:23:21 +00:00
Jakub Libosvar
5bcba03471 Remove unused functions from devstack/lib/ovs
We don't need condinional ovs compilation since we run on Ubuntu Xenial.
This patch removes remaining bits that are not used by Neutron nor any
other big tent project.

Depends-On: Ia8f63b91334f73519878ba90957db84e7cf176f9
Change-Id: Icfa2eb0258af7c44638dcca688c1fa5ed343455a
2017-04-21 03:58:27 -04:00
Jakub Libosvar
70b82034ac fullstack: Compile openvswitch module for fullstack test
After switching to UCA, we started getting ovs 2.5.2. There was a
condition that compiled openvswitch only if the version was lower than
2.5.1. This patch always compiles only kernel part of openvswitch so we
get VXLAN tunnelling working with fullstack.

Closes-bug: 1684897

Change-Id: I13898fc661d590609d2ef40873daef987956db6b
2017-04-20 15:24:03 -04:00
Jenkins
2924ac1061 Merge "devstack: configure ml2 extension drivers using lib/neutron" 2017-04-18 16:23:44 +00:00
Ihar Hrachyshka
dd882bbc57 Move NEUTRON_* definitions from plugin.sh into settings file
If devstack triggers a plugin that directly imports from devstack/lib/*
before triggering neutron's plugin.sh, NEUTRON_* variables that are used
in some devstack/lib/* files may not be set.

The ``settings`` file is sourced by devstack for all repos before any of
plugins enabled in the environment is triggered, and so moving NEUTRON_*
definitions there should guarantee for us that the variables are set
when the first enabled plugin is executed.

Since Q_PLUGIN_CONF_PATH and Q_PLUGIN_CONF_FILE are defined in
lib/neutron_plugins/ml2:neutron_plugin_configure_common, and we want to
avoid triggering that code from the plugin, we need to duplicate values
for NEUTRON_CORE_PLUGIN_CONF_PATH and NEUTRON_CORE_PLUGIN_CONF from
there.

Closes-Bug: #1675022
Change-Id: Ib65d3615fba270c2fd6c116218bbb95a29f56aa6
2017-03-21 10:16:00 +00:00
Jenkins
1174fa20e7 Merge "devstack: switch to new NEUTRON_* variables" 2017-03-21 13:17:11 +00:00
Ihar Hrachyshka
c1acf1cb24 devstack: use neutron_service_plugin_class_add for service plugins
This function is public and works for both lib/neutron as well as
lib/neutron-legacy modes.

Co-Authored-By: YAMAMOTO Takashi <yamamoto@midokura.com>
Change-Id: Ib9da52b32bc9adca337e02383194f3fbd9256e9a
Depends-On: I9068fd608e82e70db8d725f92269a26920efebcb
2017-03-07 21:20:51 +00:00
Ihar Hrachyshka
67ccaadd4d devstack: added new neutron-* aliases for services
All services except q-sriov-agt now have their neutron-* counterparts.
The only service left behind is the SRIOV agent since it's not critical
to cover it right now, because it's not deployed in gate with the new
lib/neutron code.

Change-Id: I2fbd7649b6ef312940dca704ed3ebdb1e2e93576
Co-Authored-By: YAMAMOTO Takashi <yamamoto@midokura.com>
2017-03-07 21:11:31 +00:00
Ihar Hrachyshka
abd38171ba devstack: switch to new NEUTRON_* variables
Those are generally defined by new lib/neutron code.

Change-Id: I2dd0128267b8a836c392d7ac26ade5bd0f421997
Co-Authored-By: YAMAMOTO Takashi <yamamoto@midokura.com>
2017-03-07 21:06:35 +00:00
Ihar Hrachyshka
a86896f176 devstack: configure ml2 extension drivers using lib/neutron
Change-Id: If3b863432ee12fc449bc3b7bfa60686dd2ca49b0
Depends-On: I45f017d1b8a3054452c3166ed4fb460d21959adb
2017-03-07 10:28:37 +00:00
YAMAMOTO Takashi
b1405cbe1e Use gate_hook to enable q-trunk for rally.
Instead of making devstack enable it, because it can have
undesired effects for other rally-using gate jobs.
(See Closes-Bug for an example)

Closes-Bug: #1643451
Change-Id: Id971432955196a7d5f64c598aeebf1a7bc245321
2017-01-05 23:31:10 +09:00
Jakub Libosvar
b0ea7c95a3 Don't compile OVS kernel modules for functional job
The only reason we need newer openvswitch is following fix [1] for
user-space part of openvswitch. This patch fixes our
test_install_flood_to_tun tests.

Current 2.6 branch has issues with ovsdb where connection with native
interface is getting lost and functional job gets stuck. To mitigate
that, this patch switches back to OVS 2.5.1 version for functional jobs,
compiling only user-space part as OVS 2.5.1 kernel modules are not
supported by Xenial.

Fullstack job remains running with 2.6 because the job needs OVS kernel patch
for local VXLAN tunneling.

[1] 56de2148f6

Related-bug: bug/1646107
Change-Id: Ic5419afe7170e759749afd7055441c82c317efe0
2016-12-01 11:28:17 -05:00
Jenkins
c6dbc68ed3 Merge "Install OVS from git if current version < 2.5.1" 2016-11-16 15:28:17 +00:00
Omer Anson
7403bccbc3 Install OVS from git if current version < 2.5.1
In OVS version 2.5.1 there are several bug fixes to issues that Neutron
encounters. This fix allows devstack to install a newer version of OVS,
by default version 2.5.1.

Specifically, for bug 1640283, we need the following commit from OVS:
8c0b419a0b9ac0141d6973dcc80306dfc6a83d31 ofproto/trace: Fix "unchanged"
output for Final flow

The version is overridable by NEUTRON_OVERRIDE_OVS_BRANCH variable.

Change-Id: Icc9d9811e6fc1935966241ed499c5e597a675877
Related-Bug: 1602567
Closes-Bug: 1640283
2016-11-16 14:24:31 +02:00
Armando Migliaccio
f5e30abcc5 Add rally hook to neutron devstack plugin
This allows us to configure neutron when running the rally job in
the gate. This effort stems from patch [1]. Blame Kevin for not
wanting to squash the two together.

[1] I12aaf6121b677e9696131601b3539a7091e2858c
Change-Id: I006957784ac7900021bcfee57cbc83b5a6c533c4
2016-11-10 07:44:28 +00:00
Kevin Benton
971cf85034 Add missing revision number altercations
This adds revises_on_change for the following models
and API tests to ensure the correct behavior:

* port security (network and port)
* DNS domain (network and port)
* extra dhcp opts (port)
* extra routes (router)
* subnet service type (subnet)

Additionally, it configures the DNS extension to be loaded
in the gate since the extension is enabled for tempest.

Closes-Bug: #1627649
Change-Id: Ifa969c8c2582f8f41d42df07652f259781a36bb5
2016-09-25 02:18:01 -07:00
Jakub Libosvar
c8de31cc36 devstack: the last fix of is_kernel_supported_for_ovs25 condition
Previously we didn't consider kernels higher than 4. This patch returns
True right away if the verions is lesser than 4. If it is 4, then it must
be lesser or equal to 3 to return True. All other versions are not
supported.

Change-Id: I3e9fa088d7cb9cfecbe7670c84a051e15be2a3a9
2016-09-13 11:21:30 +02:00
Ihar Hrachyshka
3a58bb1cf5 devstack: finally fix the is_kernel_supported_for_ovs25 condition
The previous condition was mistakenly using -le (less or equal) where
strict -lt (less than) condition is needed, making all 4.x matching.

Note: it's the third version of the condition. Reviewers, please
actually review. :)

Change-Id: I34d832ec762f30de16e148ba5bea4888a0606c92
2016-09-09 07:21:38 +00:00
Ihar Hrachyshka
286b55f3bf devstack: fix kernel version matching to detect ovs compilation support
The previous check was mistakenly not matching for 3.4+ kernels that
support compilation.

The ovs 2.5 version delivers stability fixes, apart from features.
That's why the fix is expected to fix recent gate failures we started to
see.

Change-Id: I21749a59a040abc8b9f6a6a6c69f3fa96515962f
Closes-Bug: #1621789
2016-09-08 20:18:27 +00:00
Jakub Libosvar
fa5e23cbe6 gate_hook: Compile ovs only with supported kernels
The intention of this patch is not to break current compilations on
Xenial boxes that run with 4.4 kernel which is not supported by OVS
openvswitch kernel module. After we are confident to switch master
branch to be running on Xenial only, we will get rid of the compilation
itself until it's needed by other features.

Change-Id: I1c890bf5a6564a69e36b8289a5d8dc0deee2a429
2016-09-06 13:22:43 +00:00
Jenkins
d4df22ae94 Merge "Enable CRUD for trunk ports" 2016-07-06 02:15:24 +00:00
Ryan Tidwell
9cda319687 Enable CRUD for trunk ports
This patch enables basic CRUD operations on trunk ports and defines
related API extensions. Trunk ports and sub-ports can be persisted
in the Neutron model and are made visible through the API, but the
L2 agent is not notified and no trunk ports or subports are actually
instantiated on compute hosts.

This one of the main patches in the series that implement the end
to end functionality.

Partially-implements: blueprint vlan-aware-vms

Co-Authored-By: Armando Migliaccio <armamig@gmail.com>
Change-Id: I26453eb9a1b25e116193417271400994ac57e4c1
2016-07-02 16:09:45 -07:00
chen-li
bcd77d1c02 Remove 'origin/' in OVS_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.

Similar change: https://review.openstack.org/#/c/333826

Change-Id: I16f6bd28ad27d4e957c226ed3fceb8881af6e84f
2016-06-28 14:10:54 +00:00
Andreas Scheuring
8e5623d624 Devstack support for macvtap agent
Macvtap agent can now be configured via this devstack.
Note that it is only supported in multinode environments
as compute node. The controller node still needs to run
linuxbridge or ovs.

Documentation will be added in devstack via [1]

[1] https://review.openstack.org/292778

Example:

OVS Controller
--------------
Make sure that the controller
- loads the macvtap ml2 driver
- uses vlan or flat networking

Macvtap Compute Node local.conf
-------------------------------
[[local|localrc]]
SERVICE_HOST=1.2.3.4
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
disable_all_services
enable_plugin neutron git://git.openstack.org/openstack/neutron
enable_service n-cpu
enable_service q-agt
Q_AGENT=macvtap
PHYSICAL_NETWORK=default
[[post-config|/$Q_PLUGIN_CONF_FILE]]
[macvtap]
physical_interface_mappings = $PHYSICAL_NETWORK:eth1

Closes-Bug: #1557407
Change-Id: I0dd4c0d34d5f1c35b397e5e392ce107fb984b0ba
2016-06-02 08:45:40 +02:00
Armando Migliaccio
e8d3626d1c Remove BGP code from neutron
Once the spinout is undergoing we should perform the eviction.

Partially-implements: blueprint bgp-spinout

Depends-on: I8be510153edbc496575cde34943ca4c56645e0fb
Change-Id: I20b6ddd37d10eae70e8294d578e53137c0f866fe
2016-04-25 21:54:06 -07:00
Jenkins
59d1673e86 Merge "Add support for building ovs from git sources on stacking" 2016-04-16 15:51:13 +00:00
Miguel Angel Ajo
2390064efa Add support for building ovs from git sources on stacking
This eases the deployment of a devstack machine with the latest
Open vSwitch bits, adding this to local.conf provides a fully
featured ovs-ct firewall setup:

  enable_plugin neutron git://git.openstack.org/openstack/neutron

  Q_BUILD_OVS_FROM_GIT=True

  [[post-config|/$Q_PLUGIN_CONF_FILE]]
  [securitygroup]
  firewall_driver = openvswitch

Change-Id: Ia7ad1658b95d7404384c7cae833008a57e3e5af1
2016-04-12 15:59:44 +02:00
chen-li
0de0034ed1 Add RECLONE support for ovs
When user sets "RECLONE=True" in local.conf, all components need
to be cloned. This flag is not handled in the ovs script, and when
the repo exists - it won't be refreshed.

Change-Id: I2831f77271880c5964627673cbc0a62c211a045a
2016-04-12 01:17:16 +00:00
Jakub Libosvar
92af3114a7 Define localstatedir for ovs compilation
By default localstatedir is PREFIX/var, which means logs are placed to
/usr/var/log/openvswitch directory. This patch redefines explicitly to
put the log files into /var/log/openvswitch, also /var/run/openvswitch
will be correctly used for pid file.

Change-Id: I1a02e8f33e745da82addfbf34efd487adf726e71
Closes-Bug: 1566569
2016-04-06 11:58:52 +00:00
Gary Kotton
dc3fb1ce46 BGP: remove unnecessary configuration setting
By default oslo CFG sets the default value as None. There is no
need to specifically do this.

The patch also moves the RYU_BGP_SPEAKER_DRIVER to the devstack
settings file.

TrivialFix

Change-Id: Ic33871a0a42fa9a5e5af3158532ecdad9817e5ab
2016-03-01 03:15:15 -08:00
vikram.choudhary
b33c4dd2ce BGP Dynamic Routing: introduce BgpDriver
This patch introduces BgpDriver interface which will be used by
the BgpDrAgent for passing BGP speaker, peer and route information
to the registered BGP driver.

In addition, this patch also implements Ryu as a reference
BGP driver for the proof of concept.

Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hp.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Change-Id: If9a7e2c4c45c395b8e93bd1293667bf67f53dcfa
2016-02-24 12:02:39 -08:00
vikram.choudhary
fbe754b04b BGP Dynamic Routing: introduce BgpDrAgent
This patch implements a new agent named "BgpDrAgent". The new agent
will host different BGP speaking drivers and makes the required BGP
peering session/s for neutron. The agent takes the needed "peer/s and
route/s" information from the BGP speaker entity and synchronize the
same to the registerd driver.

For realizing HA, two BgpDrAgents should host the same BGP speaker.

Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hpe.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Change-Id: I3217795bdd0fa2d9d4b39274f4f95fc013c8d29d
2016-02-18 10:46:55 -08:00