Assaf Muller [Tue, 5 Jan 2016 01:30:43 +0000 (20:30 -0500)]
Fix API tests
Patch https://review.openstack.org/#/c/256164/
broke the Neutron API job by unsetting Tempest configuration
values that were unused by Tempest, but used by Neutron's fork
of Tempest. This patch copies credentials from the 'auth' section
to the 'identity' section.
The longer term plan is detailed here:
https://etherpad.openstack.org/p/neutron-tempest-defork
TL;DR: Removed overlap of tests between the Tempest and Neutron
repos, then use Tempest's plugin architecture for the tests that
will remain in the Neutron repo.
Herman Ge [Mon, 28 Dec 2015 11:31:42 +0000 (06:31 -0500)]
Misspelling in message
Misspelling in following message:
"# interconnect physical and integration bridges using veth/patchs".
Should be:
"# interconnect physical and integration bridges using veth/patches".
Totally 1 occurrence in Neutron base code.
watanabe isao [Tue, 30 Jun 2015 05:36:40 +0000 (14:36 +0900)]
Mitigate restriction for fixed ips per dhcp port
When number of fixed ips per dhcp port exceeds max_fixed_ips_per_port,
a dhcp resync will be triggered.
The bug report stated how simply this issue can be triggered.
Moreover, "max_fixed_ips_per_port" value should be used for non-DHCP
port only and DHCP port is not affected by this parameter.
Kyle Mestery [Wed, 17 Jun 2015 14:46:47 +0000 (14:46 +0000)]
dhcp: Default to using local DNS resolution
It's pointless to not include default DNS resolution for Neutron.
This adds a new config option (dnsmasq_local_resolv) which defaults
to 'True' and will allow for DNS name resolution to work out of
the box. The caveat is that if the 'dnsmasq_dns_servers' is set it
will override the 'dnsmasq_local_resolv' setting, thus allowing
operators to explicitly set their own DNS servers.
DocImpact: Default to using local DNS resolution with the DHCP agent.
shihanzhang [Wed, 30 Dec 2015 07:55:35 +0000 (15:55 +0800)]
Remove unused variable use_call in ovs-agent
The patch Id28248f4f75821fbacf46e2c44e40f27f59172a9 makes agent
always reporting its state with RPC call() method, so the variable
self.use_call was unused, this patch removes it.
hgangwx [Sat, 26 Dec 2015 13:16:23 +0000 (21:16 +0800)]
Wrong usage of "a"
Wrong usage of "a" in the messages:
"'%s' is not a integer"
"Create a address scope"
"Return True if port has as a allowed address pair"
"But if a agent does not report its status"
"a ipv4 link-local address"
"Retrieve and return a extended information about a network"
"It could be a eui-64 address, a random IPv6 address"
"push a elastic-recheck query for it (see below)"
"is not a enforced requirement"
"a ovs_lib.VifPort object"
Should be:
"'%s' is not an integer"
"Create an address scope"
"Return True if port has as an allowed address pair"
"But if an agent does not report its status"
"an ipv4 link-local address"
"Retrieve and return extended information about a network"
"It could be an eui-64 address, a random IPv6 address"
"push an elastic-recheck query for it (see below)"
"is not an enforced requirement"
"an ovs_lib.VifPort object"
Akihiro Motoki [Fri, 25 Dec 2015 14:27:03 +0000 (23:27 +0900)]
Allow to control to use constraint env for functional jobs
VPNaaS functional tests now use dsvm-functional instead of
*-constraints. Always assuming *-constraints breaks the functional
jobs which is not run in a constrainted environment yet.
Carl Baldwin [Wed, 23 Dec 2015 17:16:15 +0000 (10:16 -0700)]
Add address scope to floating IPs in RPC response to L3 agent
The L3 agent needs to know the address scope of the fixed ip of each
floating ip because floating ips are a way to cross scope boundaries.
Without the scope information, there could be ambiguity and no way to
know which scope to send it to.
QoSAgentExtension should invoke QoSAgentDriver
to reflush qos policy rules only if there is any rules related change.
QoS policy changes, such as description change, should not cause
reconfiguration of the qos policy rules.
lzklibj [Thu, 17 Dec 2015 04:07:32 +0000 (12:07 +0800)]
update docstring for get_ports_on_host_by_subnet
This patch updates docstring for get_ports_on_host_by_subnet, to
tell that the method will only get dvr serviced ports, not all ports
for given subnet and host.
Akihiro Motoki [Tue, 22 Dec 2015 10:14:37 +0000 (19:14 +0900)]
Restore _validate_subnet/uuid_list not to break subproject gates
https://review.openstack.org/#/c/258867/ removed
_validate_subnet_list and _validate_uuid_list.
_validate_subnet_list is being used in VPNaaS and VPNaaS gate
is now broken. We need to remove validators more carefully
because subprojects may use them.
This commit restores them once.
Assaf Muller [Mon, 21 Dec 2015 22:50:36 +0000 (17:50 -0500)]
Delete test_restart_l3_agent_on_sighup
After looking at the test and its scope, it seems like 100% of the
code it tests is owned by oslo.service. That library has its own tests,
is there value in keeping the test in Neutron?
DVR:Fix _notify_l3_agent_new_port for proper arp update
Now with notifications coming from ml2 plugin on port create
and port update, it is worth fixing the existing _notify_
l3_agent_new_port for proper arp update and router scheduling.
Previously we have been sending arp update and calling router
scheduling for every update notification for service ports,
but now we can take necessary action only when required, since
the fix to update the arp and router scheduling was recently
done by sending the port info for every new port created.
When _notify_l3_agent_port_update is triggered, we check if the
original port host binding exists and if there is a change in
host binding with respect to the new port, then we go ahead and
reschedule the router on the new host and flush the arp entry.
Kevin Benton [Mon, 14 Dec 2015 08:44:16 +0000 (00:44 -0800)]
Add tests that constrain db query count
This patch adds unit tests to ML2 and L3 that ensure that the
number of DB calls during list operations for ports, networks,
subnets, routers, and floating IPs remains constant regardless
of the number of ports.
These will prevent changes from slipping in that result in
a separate DB query for each object in a list operation
(for changes to the extensions used by ML2 and the DVR plugin).
rossella [Mon, 14 Dec 2015 12:31:17 +0000 (12:31 +0000)]
Don't raise if polling manager is running when stopped
AsyncProcess.stop() will raise if the process we are trying
to stop is not running. Some functional tests sporadically
fail because in the clean up the polling manager is stopped
without checking if it's still running. Add an except
in InterfacePollingMinimizer.stop() to avoid raising an
exception when the monitor is not running.
Sreekumar S [Wed, 16 Dec 2015 21:04:33 +0000 (02:34 +0530)]
Corrected wrong ethertype exception message
This patch resolves the issue where wrong message was being
shown when ethertype input parameter was not amongst one of
the types supported. New message made akin to other input
parameters like 'protocol'.
Gary Kotton [Sun, 13 Dec 2015 12:52:27 +0000 (04:52 -0800)]
Use the constant HOST_ID instead of 'binding:host_id'
This patch makes use of the constant defined in the extension.
In addition to this having value of debing defined in one place it
also enables the caller to understand that the portbindings
extension is required.
Note: the constant is not used in the API tests. This has import
issues so it is not relevant.
Assaf Muller [Sat, 19 Dec 2015 19:13:43 +0000 (14:13 -0500)]
Force L3 agent to resync router it could not configure
If the L3 agent fails to configure a router, commit: 4957b5b43521a61873a041fe3e8989ed399903d9 changed it so
that instead of performing an expensive full sync, only that
router is reconfigured. However, it tries to reconfigure the
cached router. This is a change of behavior from the fullsync
days. The retry is more likely to succeed if the
router is retrieved from the server, instead of using
the locally cached version, in case the user or operator
fixed bad input, or if the router was retrieved in a bad
state due to a server-side race condition.
Note that this is only relevant to full syncs, as those retrieve
routers from the server and queue updates with the router object.
Incremental updates queue up updates without router objects,
so if one of those fails it would always be resynced on a
second attempt.
Add notes on loading strategies for ORM relationships
There have been a number of regressions caused by our inability
to thoroughly review relatiohships' loading strategies. We should
at least make an attempt to remind ourselves, and since I am guilty
as charged, this patch is my attempt to redemption.
Ihar Hrachyshka [Thu, 17 Dec 2015 13:38:08 +0000 (14:38 +0100)]
Enable Guru Meditation Reports for other refarch agents
OVS agent already supports GMR, but LinuxBridge and SR-IOV agents don't.
To enable them for those agents, we should move their main() entry
points under neutron/cmd/, so that __init__.py code that initializes
them is triggered on their invocation.
Since we put their entrypoints under neutron/cmd/eventlet/, there is now
also no need to explicitly monkey patch stdlib for eventlet in the
agents code (neutron/cmd/eventlet/__init__.py already does it for us).
With that, there is no more code in the tree that directly patches
stdlib except neutron/cmd/eventlet/__init__.py.
Also removed a way to execute agent modules as scripts since it's not a
supported way to invoke them (instead, stevedore generated console
scripts should always be used).
LIU Yulong [Tue, 8 Dec 2015 06:13:44 +0000 (14:13 +0800)]
Catch known exceptions during deleting last HA router
In some scenarios, for instance rally test create_and_delete_routers,
it will get some exceptions, such as the network in use exception,
during the router deleting api call, but actually the router has
been deleted. There has race between HA router create and delete,
if set more api and rpc worker race raises exception more frequently.
Because the inconsistent error message was not useful for user,
this patch will catch those know exceptions ObjectDeletedError,
NetworkInUse when user delete last HA router.
At the same time, when user create the first HA router, but because
of the failure of HA network creation, the router will be deleted,
then the deleting HA network will raise AttributeError, this patch
also move HA network deleting procedure under ha_network exist check
block.
Hong Hui Xiao [Wed, 4 Nov 2015 06:44:43 +0000 (01:44 -0500)]
Kill the vrrp orphan process when (re)spawn keepalived
When keepalived crashed unexpectedly, the vrrp process that
it associates with will be orphan process. This will make
the VIP unable to migrate to the router in the same host.
Also, neutron code is not able to respawn the keepalived
process, because keepalived thinks itself is still running,
according to [1-3]. As a result, neutron will report respawning
keepalived all the time. Restart l3-agent will not help.
This patch will check and delete the orphan vrrp process
if there is any, in the processmonitor of l3 agent.
More details can be found in the bug description and comments.
Bo Chi [Thu, 10 Dec 2015 13:42:26 +0000 (08:42 -0500)]
reject leading '0's in IPv4 addr to avoid ambiguity
If a IPv4 address has a leading '0', it will be interpreted as an
octal number, e.g. 10.0.0.011 will be interpreted as 10.0.0.9.
Users who are not familiar with or not expecting octal interpretation
will not get the address they intended. Since there is no standard
around this, we reject leading '0's to avoid ambiguity.
AKamyshnikova [Wed, 16 Dec 2015 12:32:45 +0000 (15:32 +0300)]
Fix comparison of Variant and other type in test_model_sync
Tests TestModelsMigrations failed on comparation Variant type and
BigInteger after alembic 0.8.4 release.
Current change corrected compare_type for such case.
Kevin Benton [Wed, 16 Dec 2015 06:49:50 +0000 (22:49 -0800)]
Use a joined relationship for AZ info on routers
This patch adds a joined relationship from the routers
to the agent table to prevent excessive DB lookups of the
agent availability zones during router listings.
This fix is the same as the one for networks here:
I908ceb1a68e0eed7c304e3ff82279ad6fa406167
A follow-up patch will add an AZ table so this doesn't
have to join directly to the agents table.