229 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
d9ec42028d lib/neutron: Add a utility method to add service plugin
Partial-Bug: #1604664
Change-Id: I6d49ac188f7f1cfc8da314a26c9c5fc4b6d65bf4
2016-11-28 16:10:27 +00:00
Jenkins
c0ef1bd05b Merge "lib/neutron: Create initial topology only on controller node" 2016-11-28 10:41:09 +00:00
Matt Riedemann
c9c9d31d3e tempest: set network-feature-enabled.port_security
Sets the port_security feature flag in tempest.conf
if the port_security extension is enabled, which it's not
by default in neutron but is set by default in devstack.

This adds global variable for setting the port_security
extension in ml2.conf and in tempest.conf so we only have
to set this in one place.

Depends-On: I1efd5c838aa0d73cc6e8864e3041eea25850198d

Change-Id: I6334b200e42edd785f74cfb41520627393039619
Related-Bug: #1624082
2016-11-01 10:52:08 -04:00
YAMAMOTO Takashi
07edde1c14 lib/neutron: Create initial topology only on controller node
To avoid it being created multiple times for multinode setup.

Note: This reverts "Enable neutron to work in a multi node setup"
(commit 88f8558d874072536e7660a233f24207a7089651) partly and fixes
the issue differently.
The configuration in question uses the new lib/neutron. (not neutron-legacy)
In that case, calling create_neutron_initial_network from stack.sh directly
is a wrong way, as create_neutron_initial_network is sourced by
neutron-legacy.  The new neutron code should not rely on the legacy one.

Closes-Bug: #1613069
Change-Id: I868afeb065d80d8ccd57630b90658e330ab94251
2016-10-26 11:57:48 +02:00
YAMAMOTO Takashi
d5f730caf4 lib/neutron: Remove remaining references to Q_ variables
Q_ variables belong to neutron-legacy.

These are True by default in neutron.
Remove them in favor of post-config meta section.

Change-Id: If691a79b09003f85a07c9f33e0379a2b21e48141
2016-10-26 11:55:40 +02:00
Ihar Hrachyshka
b3a210f643 Enable bridge firewalling if iptables are used
With the plan [1] to stop enabling it by Neutron iptables firewall
driver itself, deployment tools should catch up and enable the firewall
themselves.

This is needed for distributions that decided to disable the kernel
firewall by default (upstream kernel has it enabled). This is also
needed for distributions that ship newer kernels but don't load the
br_netfilter module before starting nova-network or Neutron iptables
firewall driver. In the latter case, firewall may not work, depending on
the order of operations executed by the driver.

To isolate devstack setups from the difference in distribution
kernel configuration and version, the following steps are done:

- we load bridge kernel module, and br_netfilter if present, to get
  access to sysctl knobs controlling the firewall;
- once knobs are available, we unconditionally set them to 1, to make
  sure the firewall is in effect.

More details at:
http://wiki.libvirt.org/page/Net.bridge.bridge-nf-call_and_sysctl.conf

[1] I9137ea017624ac92a05f73863b77f9ee4681bbe7

Change-Id: Id6bfd9595f0772a63d1096ef83ebbb6cd630fafd
Related-Bug: #1622914
2016-09-29 04:26:56 +00:00
YAMAMOTO Takashi
4a55d2a660 lib/neutron: Rename core plugin variables
NEUTRON_PLUGIN -> NEUTRON_CORE_PLUGIN
NEUTRON_PLUGIN_* -> NEUTRON_CORE_PLUGIN_*

Change-Id: I1d93d8bd1e6e3bbca0e56a2da0684ab3f3fbb525
2016-09-27 13:51:09 +09:00
Jenkins
65fc49e283 Merge "lib/neutron: Use NEUTRON_PLUGIN instead of hardcoding ml2" 2016-09-26 18:18:46 +00:00
Jenkins
7957489003 Merge "Neutron: enable setting debug as True or False" 2016-09-26 13:57:51 +00:00
Jenkins
a2d1848419 Merge "Use apache for tls-proxy ssl termination" 2016-09-21 18:19:40 +00:00
Gregory Haynes
4b49e409f8 Use apache for tls-proxy ssl termination
Stud is now abandonware (see https://github.com/bumptech/stud) and is
not packaged in xenial. Lets use Apache for SSL termination since its
there already.

Change-Id: Ifcba410f5969521e8b3d30f02795541c1661f83a
2016-09-20 08:14:11 -07:00
Gary Kotton
d2ef615d8f Neutron: enable setting debug as True or False
The flag ENABLE_DEBUG_LOG_LEVEL indicates if this should be
set or not.

This will now be supported in Neutron.

Change-Id: I3afe0546b379873247fee1ef9f4cc2708a7b5713
2016-09-20 04:12:11 -07:00
YAMAMOTO Takashi
11817482c0 lib/neutron: Use NEUTRON_PLUGIN instead of hardcoding ml2
Change-Id: Ia60381694f30978984cdf33e3141dc153d294e17
2016-08-31 10:57:33 +09:00
Gary Kotton
88f8558d87 Enable neutron to work in a multi node setup
On the controller node where devstack is being run should create
the neutron network. The compute node should not.

The the case that we want to run a multi-node neutron setup we need
to configure the following (in the case that a plugin does not
have any agents running on the compute node):
ENABLED_SERVICES=n-cpu,neutron

In addition to this the code did not enable decomposed plugins to
configure their nova configurations if necessary.

This patch ensure that the multi-node support works.

Change-Id: I8e80edd453a1106ca666d6c531b2433be631bce4
Closes-bug: #1613069
2016-08-24 08:28:37 -07:00
Jenkins
d03005321b Merge "lib/neutron: Add port_security ml2 extension driver" 2016-08-11 03:11:29 +00:00
Jenkins
881f3f15ab Merge "lib/neutron: Create initial networks regardless of neutron-l3" 2016-08-09 14:13:59 +00:00
Sean Dague
78801c10f0 enable dns resolution from guests in neutron
When running a default devstack environment, having guests that
actually can resolve DNS, so that they can do package updates from
well known hosts. This addresses a gap between nova-net and neutron
behavior in devstack.

Change-Id: I42fdc2716affd933e9158f1ef7ecb20bc664ef21
2016-08-04 14:19:20 -04:00
Sean M. Collins
ba1a64d8eb lib/neutron: Add port_security ml2 extension driver
Tempest currently conducts tests for this extension driver by
default.

Change-Id: I5f9881d0713965b66358dc9cade8d623da98d75d
2016-07-25 11:32:42 -04:00
YAMAMOTO Takashi
c07170abd7 lib/neutron: Create initial networks regardless of neutron-l3
Closes-Bug: #1604768
Change-Id: I699977930675512e9767a90f317fc0faa1ea9901
2016-07-23 18:01:28 +09:00
Sean M. Collins
a9286886e4 Neutron: include metering service plugin in conf
The common code for metering calls _neutron_service_plugin_class_add,
which despite the description only just appends a service plugin to
$Q_SERVICE_PLUGIN_CLASSES - it doesn't actually write it into a
configuration file.

So for now, read out the configuration, and append metering to it, then
write it back out.

Change-Id: Ice96cca8b43dcd54f2aa81461000a4597db8260d
2016-07-12 15:37:15 +00:00
Sean M. Collins
60f394aee2 Fix amateur level mistake.
Happy Friday!

Change-Id: I2b1112ce74577d6e3d50c5ea2131d46c77307571
2016-06-17 16:15:30 -04:00
Jenkins
45360ed32e Merge "Add neutron-metering agent and configuration" 2016-06-15 00:59:27 +00:00
Sean M. Collins
8063fee829 Add neutron-metering agent and configuration
This is the equivalent of the q-metering from neutron-legacy

Change-Id: Ie2ad6e18cfd6f5cd9af0da30bc36a1cd27e39189
2016-06-06 14:36:29 +00:00
Sean M. Collins
fbba3b9d8b Neutron: Remove verbose and always set debug to true
http://lists.openstack.org/pipermail/openstack-dev/2016-May/095166.html

Change-Id: I7c51518c10d96eb84a6ddd2514011bfd42623d5d
2016-05-24 16:23:43 -07:00
Sean M. Collins
e7d2b56391 Always pass $NEUTRON_CONF
When running a compute node that only runs n-cpu and neutron-agent,
there are still configuration items that are needed by the agent that
reside in $NEUTRON_CONF - such as the rabbit rpc information.

Change-Id: Ib7f5dde3afb0c19dc88f351c99bc669217952a14
2016-05-18 09:58:03 -04:00
Sean M. Collins
1cd2828da4 Neutron refactor: Clarify use of neutron-metadata-agent
The commit message of 2a242519f71e86416e78541826cac2b54fcd04a5 indicated
that neutron-metadata-agent was the correct name for the metadata
proxy, but parts of the code were not consistent.

Change-Id: I52f08266a169aeb9005c0f84296fc814d05b90d4
2016-05-12 11:17:39 -04:00
Sean M. Collins
5394cc101d Neutron refactor: Fix missing call to init RPC backend
Change-Id: I2c7f116230f53d3a2460192bc7b513b2e230c736
2016-05-11 16:22:31 -04:00
Sean M. Collins
2a242519f7 Begin new lib/neutron
Background for this work can be read on the mailing list:

http://lists.openstack.org/pipermail/openstack-dev/2016-May/094063.html

Usage of the new Neutron is by setting the following in
ENABLED_SERVICES:

* neutron-api
* neutron-l3
* neutron-agent
* neutron-dhcp
* neutron-metadata-agent

For now, the new neutron library supports just the ML2 plugin, with the
Open vSwitch and Linux Bridge agents supported. All other Neutron
plugins should be creating their own DevStack plugin if they wish for
DevStack to support them. Many of them already do.

Other notable changes compared to neutron-legacy:

* Rely on the Neutron defaults, and force Neutron to make
  sane defaults instead of all kinds of knobs in DevStack.

* Default to rootwrap daemon support

* Use the security group driver by default

* interface_driver can now use NEUTRON_AGENT (linuxbridge, openvswitch), since
  they are entrypoints in neutron's setup.cfg

* Use NEUTRON_AGENT variable to determine which agent to run
  Works with NEUTRON_AGENT set to either "linuxbridge" or "openvswitch"
  Default is openvswitch for the time being.

* Set ML2 configuration for VXLAN support

* Remove Xen hypervisor stuff - it should be a plugin

* Move L3 crud into separate service file:

  There's a lot of L3 configuration that was in the main neutron file, but
  a lot of it is self contained and can be moved into its own file.

  The new l3 service file will contain all the previous L3 plumbing and
  configuration that the OpenStack Gate expects, while also eventually
  moving the whole l3 network creation step into a single hook that can be
  overridden by plugins.

* Introduce a check for a function "neutron_plugin_create_initial_networks" which
  will become the mechanism through which different topologies, and
  networking plugins can create and wire the initial networks that are
  created during a stack.sh run.

The new lib/neutron is considered experimental, and followup patches
will build upon this one. Existing users of lib/neutron-legacy should
remain unharmed.

Co-Authored-By: Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>
Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
Change-Id: I31b6362c6d9992f425f2dedbbeff2568390a93da
2016-05-09 14:26:08 -04:00
Dean Troyer
3bb5a6f445 Remove symlink for lib/neutron compat
Depends-On: I146910403879c9a85d644bd07a53830ea17ca77d
Change-Id: Ia25331fc74fd26df347024a8314bc4c6ed54428e
2015-03-28 13:46:49 -05:00
Dean Troyer
5a9739a4ca Rename lib/neutron to lib/neutron-legacy
Preparing to refactor lib/neutron to support Neutron as the default
network config.  lib/neutron will be renamed internally and refined
to support a couple of specific configurations.

Change-Id: I0d3773d14c4c636a4b915734784e7241f4d15474
2015-03-25 22:22:11 -04:00
Alessandro Pilotti
85c98b3e18 Revert "Support for single interface Neutron networking with OVS"
This patch is causing blocking failures in some 3rd party CIs.
The issue can be tracked to the fact that the PUBLIC_INTERFACE
interface might have no address assigned.

This reverts commit 93b2100c983e1c271a8d51aa7f4755a6445be6a8.

Partial-Bug: #1436607
Change-Id: I0943aa542b911fbcebb100543e0adbb38159b233
2015-03-26 00:32:54 +01:00
Jenkins
5939ec1fa1 Merge "Support for single interface Neutron networking with OVS" 2015-03-25 18:37:24 +00:00
Sean M. Collins
93b2100c98 Support for single interface Neutron networking with OVS
When running Neutron on a single node that only has a single interface,
the following operations are required:

    * Remove the IP address from the physical interface
    * Add the interface to the OVS physical bridge
    * Add the IP address from the physical interface to the OVS bridge
    * Update the routing table

The reverse is done on cleanup.

In order run Neutron on a single interface, the $PUBLIC_INTERFACE and
$OVS_PHYSICAL_BRIDGE variables must be set.

Co-Authored-By: Brian Haley <brian.haley@hp.com>

Change-Id: Ie35cb537bb670c4773598b8db29877fb8a12ff50
2015-03-25 11:42:45 -04:00
Jenkins
743d03bf7d Merge "iniset_rpc_backend default section" 2015-03-22 02:41:03 +00:00
Jenkins
05163d66ac Merge "Use install(1) where possible" 2015-03-20 14:30:06 +00:00
Dean Troyer
8421c2b9ab Use install(1) where possible
This eliminated a number of sudo calls by doing the copy/chown/chmod in
a single step and sets a common pattern.

Change-Id: I9c8f48854d5bc443cc187df0948c28b82c4d2838
2015-03-18 13:30:59 +11:00
Yuriy Taraday
2662395fac Add rootwrap daemon mode support for Neutron
Daemon mode is turned on by default.

Implements: blueprint rootwrap-daemon-mode
Change-Id: I632df4149e9d7f78cb5a7091dfe4ea8f8ca3ddfa
2015-03-17 04:12:13 +03:00
Brant Knudson
2dd110ce86 iniset_rpc_backend default section
iniset_rpc_backend should know what section it needs to set the
config options in better than the callers. The config options
have actually been moved to different sections and the options
in the DEFAULT section are deprecated.

Change-Id: I0e07fe03c7812ef8df49e126bf71c57588635639
2015-03-14 17:53:54 +00:00
Jamie Lennox
dc757dd850 Configure neutron->nova with identity v3
Use authentication plugins for neutron -> nova communications and
default to using the password plugin, which defaults to using the
v3 Identity API.

Neutron config change: 13427a40768f1a4646520c6b7e3e8c988ce6e18c
Change-Id: If152b97f940286ed08767225b13dedf6ef8c2342
2015-03-09 05:41:45 +00:00
Doug Wiegley
93e682c558 Revert change to remove lbaas from devstack; it breaks grenade.
Change-Id: Ie2adaeb7f27d6d646ca2e6e575fb430b9b74b276
2015-03-03 10:31:30 -07:00
Jenkins
81dcb64b0d Merge "Remove LBaaS support from devstack" 2015-03-02 20:43:09 +00:00
Jenkins
db56ee8ef2 Merge "VPNaaS Support for StrongSwan driver." 2015-03-01 21:12:41 +00:00
Paul Michali
6fd4720e60 VPNaaS Support for StrongSwan driver.
The StrongSwan driver under development for kilo-3 will replace the
default reference OpenSwan driver.

In the interim though, we need to be able to run functional tests
for both drivers. This change is intending to do the additional
steps that are needed to set up for Strongswan, so that when a
functional test has IPSEC_PACKAGE=strongswan, everything will be
correct.

The intent here is to explicitly set the device driver class in
vpn_agent.ini, so that this will work for when OpenSwan is the
default (currently), when no drivers are specified, and will work
for when StrongSwan is made the default in the code.

For Ubuntu, AppArmor is disabled for charon and stroke.

Note: Both OpenSwan and StrongSwan cannot be installed on the
host at the same time.

Change-Id: Ib8467e24633230d6643d812068e4ed6ffb33f104
Partial-Bug: 1424757
2015-02-27 12:05:15 -05:00
Al Miller
b124f4d595 Remove LBaaS support from devstack
Devstack support for LBaaS is being migrated to an external
plugin in the neutron-lbaas repository.  The only LBaaS-
specific code that remains in devstack is a hook to support
existing configs that enable q-lbaas.  In that case, load
the external plugin if necessary.

Change-Id: I592f64407ccf1e722b8d9788917879d0236acf0b
Depends-On: I64a94aeeabe6357b5ea7796e34c9306c55c9ae67
2015-02-27 16:36:51 +00:00
Naohiro Tamura
907d41c262 Add error checks to provider net and subnet creation
Error checks are added to detect provider network and subnet
creation.

Closes-Bug: #1423766
Change-Id: I4d4323d1c3159f84ce3d19924a569b153038d542
2015-02-26 08:52:18 +09:00
Naohiro Tamura
4abc4d1b61 Fix an error message in the neutron script
The $PHYSICAL_NETWORK in the error message should be
$PRIVATE_NETWORK_NAME, because the command just before this error
message refers to $PRIVATE_NETWORK_NAME.

Change-Id: I9a648f8bd0e61abde8e93bc08282c14b35ec06bd
2015-02-17 22:20:19 +09:00
Jenkins
5e781bd9d0 Merge "Isolate creating service users" 2015-02-09 17:59:36 +00:00
Jenkins
f297064c53 Merge "lib/neutron: Update comments about entry points" 2015-02-09 16:13:31 +00:00
Jamie Lennox
85ff5323ff Isolate creating service users
The code for creating service users is almost exactly the same. Abstract
this into a function that can be reused and standardized.

Change-Id: I3a4edbff0a928da7ef9b0097a5a8d508fdfab7ff
2015-02-09 14:36:20 +11:00
Jenkins
f9222da73f Merge "Stop neutron services more explicitly" 2015-02-06 20:34:23 +00:00