Ann Kamyshnikova [Wed, 20 Aug 2014 12:24:10 +0000 (16:24 +0400)]
Block downgrade from icehouse to havana
We are purging all downgrade methods from icehouse to havana because:
1) havana is going to become unsupported during Kilo cycle.
2) most people will upgrade from icehouse, while a minor percentage
from havana
3) downgrade use cases are mostly to revert after failed upgrades
See discussion in https://review.openstack.org/109952 for details.
This change removes all downgrade code in this migrations and raises
an exception in downgrade of icehouse_release.
Akihiro Motoki [Mon, 18 Aug 2014 18:49:30 +0000 (03:49 +0900)]
Make L3RpcCallback a separate callback class
RPC has a version of itself. In Neutron a plugin implements
several RPC interface, so a single RPC version doesn't work.
In Mixin callback class approach, RPC versioning depends on
each plugin implementation and it makes harder to maintain
RPC version appropriately. This patch series replaces mixin
RPC callback of server side with a separate class.
This commit handles server-side callback of L3-agent RPC interface.
L3-agent server-side callback class is moved from db/ to
api/rpc/handlers because it doesn't involve any db operations
and defining all RPC interfaces in a single place sounds reasonable.
Note that moving other L3-agent related RPC interface class
to api/rpc/handlers will be done in a separate patch as this patch
focuses on reorganizing the server-side RPC callback class.
This method is more complicated than it needs
to be, and it makes it difficult to target
fixes for it.
Furthermore, this method calls into
auto_schedule_routers, which duplicates some
of the DB calls already made in the above
mentioned method. This refactoring
is done in preparation of the performance
improvement.
Henry Gessau [Sun, 27 Jul 2014 02:05:02 +0000 (22:05 -0400)]
Predictable iptables chains output order
This fixes the iptables unit tests that break with a randomized PYTHONHASHSEED
(see the bug report).
The chains for iptables are stored as sets to avoid duplicates. When they are
output by iptables_manager their order can therefore be unpredictable. This was
found hash seed 1016732220.
To fix this we:
- Sort the chains output by iptables_manager
- Update the unit tests to check for sorted chains
When multiple tables are processed, they can be processed in any order or
dumped in any order. Found with hash seed 3728666619.
To fix this we:
- Traverse the tables in sorted order for dumping
- Fix tests to allow for tables to be processed in any order
Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.
Currently, DVR router namespaces are created only
when there is a valid VM port on the compute
node, or for the gateway-port on the service node.
But when an LBaaS VIP port is created the l3 agent
does not create a DVR namespace to service the VIP port.
This fix enables DVR namespaces to be created to
service the LBaaS VIP port.
Also, this fix enables L2 Agent running in DVR
mode, to add-in OVS rules to enable packets to
be routed to such LBaaS VIP Ports which are
resident on DVR routed interfaces.
Therefore, with this fix both East-West and
North-South traffic will be serviced by DVR
for LBaas VIP Ports.
Michael Smith [Mon, 25 Aug 2014 17:33:40 +0000 (10:33 -0700)]
ext-gw update on dvr router improperly handled by l3-agent
The recently added external_gateway method does not check
the agent mode or host binding before adding an external
gateway to a particular node/agent. This fix adds the
required checks in the update path.
Fix for floatingip-delete not removing fip_gw port
fip_agent_gateway_port is created dynamically on a
compute node where FIP namespace is created. When
floatingip-disassociate is called this 'port' is
deleted.
But when we call floatingip-delete this port is
not deleted.
Saksham Varma [Thu, 14 Aug 2014 21:39:20 +0000 (14:39 -0700)]
Increase the default poll duration for Cisco n1kv
Increase the poll duration for Cisco N1Kv, from 10s to 60s and also
clean up the /etc/neutron/plugins/cisco/cisco_plugins.ini file. The
current poll duration of 10s causes that VSM to unnecessarily taking
frequent CPU cycles, resulting in the failure of other tasks in scale
configurations.
Jakub Libosvar [Tue, 22 Jul 2014 08:45:52 +0000 (10:45 +0200)]
Change autogenerate to be unconditional
Template for generating db migration scripts are now not run according
to used plugins. Target environment is set to use all available models
but also used plugins are kept for backward compatibility.
Part of this patch is script that will drop unused tables to avoid
generating the drop in future migration scripts.
Chirag Shahani [Fri, 8 Aug 2014 02:04:34 +0000 (19:04 -0700)]
Add template attr. for subnet, router create in Nuage plugin
subnet create and router create commands now gives the ability
to the user to create subnets and routers via neutron cli with
additional attributes nuage_subnet_template and nuage_router_template
respectively. The instantiated subnet and router inherits the properties
of the template that was mentioned in the additional parameters.
Assaf Muller [Tue, 5 Aug 2014 20:12:55 +0000 (23:12 +0300)]
Implement ip_lib.device_exists_with_ip_mac
ip_lib.device_exists simply checks that a device is in an
(optional) namespace. This patch adds
ip_lib.device_exists_with_ip_mac, which also verifies that
the device is configured with the given IP and MAC addresses.
The new function is used in functional tests in a patch
further down the dependency chain.
Added functional tests for ip_lib.device_exists,
ip_lib.device_exists_with_ip_mac.
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
Evgeny Fedoruk [Tue, 12 Aug 2014 11:13:24 +0000 (04:13 -0700)]
Removing sorted() function from assertEqual()
Removing unnecessary sorted() function from assertEqual() function
calls in functions used for sorting and pagination testing
Using sorted() breaks sorting tests objective which is to test sorting.
This is causing every unit test using this functions
(_test_list_with_sort, _test_list_with_pagination, _test_list_with_pagination_reverse)
for sorting tests to always succeed
Switched the parameters for assertEqual() function within the fixed code to meet
its signature - assertEqual(self, expected, observed, message='')
Test neutron.tests.unit.vmware.vshield.test_lbaas_plugin.TestLoadbalancerPlugin.test_list_vips
was succeeding because of this bug, although it should fail. It failed after the bug was fix.
Test was fixed.
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.
Kevin Benton [Fri, 22 Aug 2014 05:56:13 +0000 (22:56 -0700)]
One Convergence: Skip all tests with 'v6' in name
Adds a check to the test setup for the One Convergence tests
to look for v6 in the name of the test and skip it if present.
This prevents IPv6 developers from having to explicitly skip
each new IPv6 test in the One Convergence unit tests until the
plugin gains IPv6 support.
Paul Michali [Tue, 29 Jul 2014 19:18:34 +0000 (15:18 -0400)]
VPNaaS: Enable UT cases with newer oslo.messaging
Now that 1.4.0.0a3 of oslo.messaging has been added to Neutron
requirements, the unit test cases in VPNaaS code can be
uncommented and included in the tests. These tests ensure that
the correct validator is called, when validation is performed.
This adds similar tests to the reference and Cisco VPNaaS
implementation.
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.