Networks are not scheduled to DHCP agents for Cisco N1KV plugin
With the config option 'network_auto_schedule = False' in
neutron.conf, networks do not get scheduled to available DHCP
agents. The fix is to explicitly schedule the network as part
of the subnet creation flow.
Maru Newby [Tue, 25 Mar 2014 10:54:04 +0000 (03:54 -0700)]
Refactor plugin setup helpers out of test.base
Helper methods for plugin and notification setup were previously
defined on neutron.tests.base.BaseTestCase. The imports required to
support these helpers were preventing the api tests from consuming
tempest due to configuration conflicts that resulted between neutron
and tempest. This change moves the helpers to a new module in
tests/unit so that BaseTestCase can be safely used across all types of
tests.
Eugene Nikanorov [Fri, 22 Aug 2014 12:29:49 +0000 (16:29 +0400)]
Raise proper exception in case duplicate ipv6 address is allocated
In case neutron tries to generate ipv6 address for slaac subnet,
it doesn't check that generated ip is unique and throws DB exception
that results in 500 HTTP error.
Setting the mysql_engine when creating a table is not needed
anymore as this is automatically done by an event listener
added with commit 466e89970f11918a809aafe8a048d138d4664299
Maru Newby [Sat, 23 Aug 2014 06:21:07 +0000 (23:21 -0700)]
Add hook scripts for the functional infra job
Infra jobs support hooks to customize behavior. This change adds
scripts that are intended to be called by the neutron-dsvm-functional
jobs as hooks. Defining hook behavior in-tree instead of directly in
the job definition has the advantage of allowing changes in hook
behavior to be tested before merge.
The gate_hook.sh script added by this change installs a rootwrap
filter to allow functional tests to destroy python processes that
they have spawned. The tests use the python executable provided by
their tox env, and the default rootwrap configuration does not
support killing processes launched by non-system python executables.
This change will have to merge to master and stable/icehouse before
the supporting infra config change can be merged:
Ihar Hrachyshka [Thu, 21 Aug 2014 13:49:24 +0000 (15:49 +0200)]
Refresh rpc_backend values in unit tests to those from oslo.messaging
Though old values are supported via compatibility transport aliases [1],
it's better to stick to those values that are officially supported by
oslo.messaging.
Do not log WARN messages about lack of L3 agents for DVR routers
DVR routers are scheduled only when there is need to: for instance when
there's an external gateway associated with it, or when there are
interfaces attached to subnets on which VM's are actually being deployed.
Therefore, do not log misleading messages that apply only to the
centralized case.
Elena Ezhova [Thu, 21 Aug 2014 14:36:42 +0000 (18:36 +0400)]
Fix policy rules for adding and removing router interfaces
Currently "add_router_interface" and "remove_router_interface"
policy rules have the "update_router" prefix and thus are never
enforced. Removing the prefix activates the rules.
Also moved some rules, so that all router-related rules are
now grouped together.
Kevin Benton [Tue, 19 Aug 2014 22:15:09 +0000 (15:15 -0700)]
Join tables in query for down L3 agents
Join the agent table together with the L3 agent scheduler
table. This fixes an issue where the query would return
all admin_state_up L3 agents with router bindings when
any agent in the database was dead (missed heartbeats)
instead of just returning the dead L3 agents with bindings.
Carl Baldwin [Tue, 19 Aug 2014 03:58:22 +0000 (03:58 +0000)]
Rename range to avoid shadowing the builtin
This refactor supports a patch I was reviewing [1]. I thought it
better to apply this consistently in this file as a separate refactor
so that that patch could be done cleaner.
The ML2 RPC version 1.1 breaks the hyper-v agent and
consequentially the RPC version in the Hyper-V agent needs
to be set to 1.1 to match the ML2 RPC base API version.
Aaron-Zhang231 [Sat, 15 Feb 2014 13:54:53 +0000 (05:54 -0800)]
Assign Cisco nw profile to multi-tenants in single request
Currently with Cisco N1kv plugin, user can assign cisco network
profile to only one tenant in a request. So user has to send
multiple requests to assign a cisco network profile to multiple
tenants.
This fix is going to add the support to assign to multiple tenants
in a single request
This fix has corresponding changes in neutron, python-neutronclient
and horizon. All the changes should be committed at the same time
Carl Baldwin [Tue, 19 Aug 2014 05:07:47 +0000 (05:07 +0000)]
Remove unused network parameter from _allocate_ips_for_port
I found this in the context of a patch that I was reviewing [1]. I
found that patch left a few loose ends and so I thought it would be
better to remove the parameter as a separate refactor so that it can
be carefully reviewed. The other patch [1] should be rebased to this
one.
* This patch adds support for subnets created with 'ipv6_address_mode'
set to 'dhcpv6-stateful' or 'dhcpv6-stateless' by dnsmasq.
* If no dnsmasq process for subnet's network is launched, Neutron
will launch new dnsmasq process on subnet's dhcp port in 'qdhcp-'
namespace. If previous dnsmasq process is already launched,
restart dnsmasq with new configuration.
* Neutron will update dnsmasq process and restart it when subnet
gets updated.
* This patch enforces the version check of dnsmasq. dhcp-agent will
fail to start if version of dnsmasq<2.63.
Implements securitygroup extension for nuage plugin
In Nuage VSP, the scope of vport-tag(Neutron securitygroup equivalent) is either
per router or per subnet whereas securitygroup scope in Neutron is per tenant.
Because of this, the mapping between neutron and VSP resource always happens at
the port create or update time, such that port's router/subnet is known and
thus sg attachment point in VSP is known.
On port-update --security-group sg1, if this is the first port getting attached
to that security-group, corresponding vport-tag(for sg) and rules( for sg rules)
are created on VSP. Subsequent port-update for the same sg1 will just update the
port to vport-tag binding. When security-group and security-group-rules are
deleted on neutron, corresponding vport-tag and rules are deleted on the VSP.
Kris Lindgren [Wed, 20 Aug 2014 01:33:22 +0000 (19:33 -0600)]
Fix bigswitch setup.cfg lines
Bigswitch was not correctly creating the bigswitch/ssl/ca_certs and
host_certs directories when running the setup.py install step. This
makes it difficult to correctly package the plugin because it has
missing files/directories.
Jakub Libosvar [Thu, 7 Aug 2014 08:35:07 +0000 (10:35 +0200)]
Ensure ip6tables are used only if ipv6 is enabled in kernel
On systems where ipv6 module is not loaded in kernel we need to avoid
usage of ip6tables. This patch reads
/proc/sys/net/ipv6/conf/default/disable_ipv6 file and if ipv6 is
disabled then ip6tables are not used in IptablesManager
If PostgreSQL version is less than 9.1.13 migration
set_length_of_description_field_metering fails as there is no
special 'create if not exist' expression. This change add special
function for this case.
Ann Kamyshnikova [Thu, 24 Jul 2014 10:33:02 +0000 (14:33 +0400)]
Set InnoDB engine for all existing tables
Added the method in heal script that checks if mysql_engine
parameter is needed to be changed and if it is neseccary do this.
Also this change adds migation that set 'mysql_engine' to InnoDB
for all tables that were added into the database after healing.
Eugene Nikanorov [Wed, 13 Aug 2014 11:10:45 +0000 (15:10 +0400)]
Reorder operations in create_vip
Previously VIP's port creation was moved outside the transaction
to avoid deadlocks related to rpc calls.
It led to small chance of VIP being fetched by rpc code with
port being still None.
This patch reorders VIP association with the pool so it's done
only after port has been created.
This patch also leaves small possibility of uncaught exception in
case of pool being concurrently deleted in the process of VIP creation
Elena Ezhova [Tue, 12 Aug 2014 15:43:09 +0000 (19:43 +0400)]
Send HTTP exceptions in the format expected by neutronclient
Neutron client for the v2 API expects exceptions to have 'type',
'message' and 'detail' attributes. That is why they need to be
included in the body of HTTP Exceptions.
Remove auto-generation of db schema from models at startup
This patch removes the Neutron capability of creating database tables
from sqlalchemy models for all those model classes for which
a table is not found in the database schema.
Migrations should be the official and only solution for creating and
managing the Neutron db schema.
This patch also adapts unit tests in order to ensure test schemas
are still correctly created.
Carl Baldwin [Thu, 10 Jul 2014 19:41:40 +0000 (19:41 +0000)]
Implement namespace cleanup for new DVR namespaces
DVR introduces a new namespace type called snat-<router_id>. These
namespaces are not properly cleaned up when found stale after an agent
restart. This patch fixes that.
The method for setting the floating IP status in the NSX plugin
has a flaw that causes in some cases the status to be reset.
This patch removes this bug and also protects against regression
adding status check in the unit test covering floating ip
creation.
This patch also moves the above mentioned unit test in a more
suitable place in the test same module.
Akihiro Motoki [Thu, 14 Aug 2014 06:53:47 +0000 (15:53 +0900)]
Skip FWaaS config mismatch check if RPC method is unsupported
In this commit FWaaS config check skip is skipped
if neutron server does not support this API.
Commit d6f014d introduced FWaaS config mismatch check between
server and agent. It added a new RPC method get_service_plugin_list
and bumped l3-agent RPC version to 1.3, but this version RPC is
only supported by L3 router service plugin and
it breaks existing plugins using L3 router mixin.
Bumping l3-agent RPC version requires detailed investigation on all
affected plugins and it can be done by plugin maintainer later.
Ihar Hrachyshka [Thu, 7 Aug 2014 22:04:44 +0000 (00:04 +0200)]
Use jsonutils instead of stdlib json
jsonutils provides multiple benefits in comparison to pure stdlib json
(like using simplejson on Python 2.6).
Similar patch was already merged before [1], but since it lacked hacking
rule to enforce jsonutils usage, new occurrences of stdlib json module
usage were introduced.
This patch switches all the code to using jsonutils and adds a hacking
rule to enforce the rule.
The hacking rule requires that jsonutils module does not mimic as 'json'
thru using import renames, so the code was updated not to rename the
module when doing import.
The hacking rule was shamelessly copied from the corresponding nova
review [2].
rajeev [Tue, 12 Aug 2014 00:42:18 +0000 (20:42 -0400)]
Fix interface add for dvr with gateway
when an interface is added after router gateway set, external
connectivity using snat fails. Instead of just adding the snat port for
the new subnet, method internal_network_added(..) incorrectly re-adds
all the snat ports with wrong cidr.