Kevin Benton [Fri, 18 Sep 2015 14:15:45 +0000 (07:15 -0700)]
Don't write DHCP opts for SLAAC entries
Change I81b4669eadaa9119e08c6a5e1d2a7b5959babdcc
caused DHCP options to be written for SLAAC entries
when they previously were not. This restores the previous
behavior.
Andreas Jaeger [Thu, 24 Sep 2015 18:53:09 +0000 (20:53 +0200)]
Cleanup of Translations
In preparation for the release, do some cleanups for translations.
Removes all po files that are partially translated. The translation
team has decided to exclude files with less than 66 % of translated
content. There is no content lost, all data is in the translation
server, we just remove it from the repository.
This updates also recreates pot (translation source files) to
reflect the state of the repository in case there was no recent
import for them.
This change needs to be done manually since the automatic import does
not handle some of these cases.
This simple patch ensures usage for security group rules is
marked as dirty when a security group rule is deleted.
To this aim, the security group rule is deleted using ORM
in order to ensure the sqlalchemy even if fired.
Miguel Lavalle [Tue, 22 Sep 2015 22:22:31 +0000 (17:22 -0500)]
Eliminate autoaddress check for DNS integration
The autoaddress check for DNS integartion is not required anymore. It is
removed from the DB plugin. This check was being performed to reflect
incorrect functionality in the DHCP agent as indicated in bug
https://bugs.launchpad.net/neutron/+bug/1498665
Carl Baldwin [Wed, 16 Sep 2015 21:53:54 +0000 (21:53 +0000)]
Only get host data for floating ips on DVR routers
First, we are only interested in setting the host attribute when
the router is a DVR router. Second, we don't need to query all of
the ports on the host, we just need to query the ports that are
referenced by the set of floating ips that we already have.
Ryan Moats [Mon, 21 Sep 2015 20:56:26 +0000 (15:56 -0500)]
Link dashboards into generated documentation
Move the dashboard directory under the source tree so that
it is available on generated builds. In addition, recast
image pages as RST so that they will be rendered
Change-Id: I316128491e8dae70ac06e260f5bdd8f440d285aa Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
ml2: don't consider drivers with no bind_port for qos supported rule types
If the driver is not going to bind a port, we should not use it as
justification to limit the subset of rule types available for the user.
The most common scenario for that would be l2pop, that does not handle port
binding, but merely modifies the implementation details of node
interconnection.
service_provider is a 'special' configuration. It is a MultiStr
option that used to be in neutron.conf, but moved into its own *-aas
config files after the service split. We allow for the definition to
be available 'anywhere': either in neutron.conf or in the *-aas
service's config file.
The list of 'service_provider' can include drivers from within the *-aas
tree, or from elsewhere, and can apply to different service types. Due to
the polymorphic nature of this variable it is very tricky to identify only
the drivers that pertain a specific service module: the service module
may as well implement more than one service type and may have support
from drivers out of tree.
For this reason it is best to relax this check and rely on query filters
when the ServiceManager.get_service_providers() is invoked. Furthermore,
without this fix there was a situation where the value returned by
'service_providers' may be differ depending on how the configuration is
passed on the CLI, and this inconsistency may only cause headaches.
ovsdb monitor: get rid of custom _read_stdout/_read_stderr methods
Those methods do the same thing as AsyncProcess counterparts, just
with logging the received output. It's better to move the logging into
AsyncProcess and control it with __init__ arguments.
This allows us to get rid of some duplicate tests for ovsdb monitor.
delete_port: ensure quota usage is marked as dirty
To this aim the ORM session mapper must be used.
This patch simply uses context.session.delete rather than
query.delete, and handles UnmappedInstanceError to safely
complete the operation when the record is deleted by
another transaction.
Miguel Angel Ajo [Thu, 11 Jun 2015 11:15:17 +0000 (13:15 +0200)]
Fix hostname roaming for ml2 tunnel endpoints.
Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced
a bug where host name changes broke tunneling endpoint updates.
Tunneling endpoint updates roaming a hostname from IP to IP
are a common method for active/passive HA with pacemaker and
should happen automatically without the need for API/CLI calls [1].
delete_endpoint_by_host_or_ip is introduced to allow cleanup of
endpoints that potentially belonged to the newly registered agent,
while preventing the race condition found when deleting ip1 & ip2
in the next situation at step 4:
1) we have hostA: ip1
2) hostA goes offline
3) hostB goes online, with ip1, and registers
4) hostA goes online, with ip2, and registers
Kahou Lei [Sun, 13 Sep 2015 01:48:04 +0000 (18:48 -0700)]
Fix adding tap failure if bridge mapping is not provided
When bridge mapping option is not provided, tap interface cannot be
added properly. The root cause is that linux bridge agent is expecting
bridge mapping option is provided if physical network is presented.
However it is not always the case as Kilo was working fine
without existing bridge mapping
For every router interface added to a router
with a default gateway there will be an internal
SNAT port generated and will be required by the
L3 Agent to process the SNAT rules.
This bug was introduced by the change ID below
Icc099c1a97e3e68eeaf4690bc83167ba30d8099a.
When the gateway is removed these ports have to
be removed from the namespace. These ports are
cached in the router_info and should be provided
to the get_snat_port_for_internal_port function
when called from external_gateway_removed or when
called from _dvr_internal_network_removed.
Ann Kamyshnikova [Fri, 18 Sep 2015 15:21:44 +0000 (18:21 +0300)]
Update _TestModelMigration
_TestModelMigrationTest contain some duplication of code from oslo.db.
As change 94d583acde16860e7ca535bd7a960e8993cd12d2 was merged and
included in oslo.db 2.4.1 this duplication can be avoid.
Pecan defines several efficient mechanism for routing requests to
the appropriate controller, but the current code for Neutron's
Pecan WSGI server basically uses Pecan hooks to route requests.
This patch partially fixes that, removing the 'resource_identifier'
pecan hook and replacing it with explicit pecan routes between
controllers added at resource registration time.
All the remaining hooks, like attribute_population and
policy_enforments, which were relying on finding the resource
name in the pecan.request threadlocal variable have been updated.
This patch also:
- ensures the appropriate plugin is always selected for a given
resource
- add a common NeutronPecanController base class for the classes
CollectionsController and ItemaController
- Fixes the way in which plurals and singulars are handled in
neutron.api.v2.resource_heper
Have you ever wondered why you were making the same mistakes
over and over again and wondered how you can remind yourself not
to repeat them again?
Have you ever felt like you posted review comments on some other
patch, only to see that the same anti-pattern was adopted in
someone else's?
Have you wondered what the heck that test was meant to validate?
Does that sound familiar to you? Yes? Great, we have the answer
for you! 'Effective Neutron' is the solution to all your problems!
From now on, everytime you bang your head against the monitor, do
not despair! You may find the answer to your grief in our collective
guide!
Go check it out!
(Your mileage may vary -- add your disclaimer here)
Jakub Libosvar [Thu, 17 Sep 2015 13:26:05 +0000 (13:26 +0000)]
Introduce kill_signal parameter to AsynProcess.stop()
All stop() calls of instances of AsyncProcess class were sending
hardcoded SIGKILL signal to its process. This patch leaves the default
behavior to SIGKILL but offers any number to be sent to kill command.
Note: Internal private methods also got a new parameter which is not
appended. Given that those methods are private and thus not used
outside of the class, we can afford it.
Kevin Benton [Thu, 17 Sep 2015 16:53:46 +0000 (09:53 -0700)]
Remove early yields in _iter_hosts in dhcp agent
There were early yields in the DHCP agent to handling skipping
lease setup for certain IPv6 addresses. However, the setup for
name resolution in _output_addn_hosts_file depends on the same
function so certain IPv6 addresses weren't getting name resolution.
This patch adjusts the function to return a flag indicating that
DHCP isn't required for the port so the callers setting up reservations
can skip based on that and the name resolution setup can continue
as normal.
Ryan Moats [Tue, 25 Aug 2015 10:57:03 +0000 (05:57 -0500)]
Optimize if statement in dvr_local_router.py
The if statement for calling create_rtr_2_fip_link and kicking
the FW agent includes a check on floating_ips, that has already
been performed by the previous if block. Pull this block into
the previous block for code clarity.
Change-Id: I8661aa3998bda9341f558d0ecbc8e2663cd95aca Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Co-Authored-By: Brian Haley <brian.haley@hpe.com>
Sean Mooney [Thu, 17 Sep 2015 12:31:13 +0000 (13:31 +0100)]
Re-adds VIF_TYPE_VHOST_USER to portbindings extension
- This change re-adds the definition of the VIF_TYPE_VHOST_USER
constant to the neuton portbinding extension.
- This change enables reuse of a single common VIF_TYPE_VHOST_USER
constant between all agents and mechanism drivers that wish
to support the qemu vhost-user interface type.
As the Pecan server only server REST requests over HTTP, this
patch introduces a new server implementing the RPC over AMQP
endpoints for agent/server communication.
However, the REST server does not yet have the ability to send
notifications to the RPC server or directly to the agents.
This patch simply adapts the ML2 plugin to run the RPC notifiers
only when initialized in the pecan server, so that notification
to agents can still be sent.
This patch therefore is tantamount to a poor man's
implementation of REST/RPC separation which will be iteratively
improved.
Previously, it was possible for None to be passed to context.session.delete()
if a port was not found (usually a result of a concurrent delete). This
resulted in an UnmappedInstanceError. This is avoided now by calling
query.delete() directly which does not raise any exceptions.
Kevin Benton [Wed, 16 Sep 2015 20:08:57 +0000 (13:08 -0700)]
Remove restriction of adding constraints to expand
Adding a constraint to a table shouldn't be restricted
to an expand operation. There can be contraction migrations
required before the constraint can be safely added (e.g. inserting
records into the target table of the constraint).
Now tempest-lib provides token_client modules as library and the
interface is stable. So neutron repogitory doesn't need to contain
these modules.
This patch makes neutron use tempest-lib's token_client and removes
the own modules for the maintenance.
Kevin Benton [Wed, 16 Sep 2015 10:02:49 +0000 (03:02 -0700)]
Revert "Pecan WSGI: prevent plugins from opening AMQP connections"
This reverts commit 2ba2456f9dae2a4cf30804a562c08832c24b6231
because it has a conflict with upstream commit 9f6bd17703b7286be9e7d439d15f4dec2774e13a. We need to merge
master into pecan with this reverted and then revert the revert
and resolve the conflict there so we don't have any conflict
resolutions in merge commits.