Oleg Bondarev [Fri, 1 Nov 2013 11:20:27 +0000 (15:20 +0400)]
ML2 plugin should not delete ports on subnet deletion
On subnet deletion ports are deleted asynchronously by dhcp agent
so plugin doesn't need to delete them itself.
Instead Ml2Plugin.delete_subnet() method should call update_port()
for each allocation to remove the IP from the port and call the MechanismDrivers.
The patch also adds subnets test suite from test_db_plugin to test_ml2_plugin.
Akihiro MOTOKI [Wed, 16 Oct 2013 10:43:10 +0000 (19:43 +0900)]
Add request-id to log messages
request-id needs to be stored in thread local store to allow
openstack.common.log use request-id.
tenant_name and user_name are added to the context so that
they can be logged by customizing the log format.
Also replaces 'cxt' with 'ctx' in test_neutron_context.py.
Previously both 'ctx' and 'cxt' are used mixed in one file.
In some cases the OVS agent might end up wiring a port for a VM
several seconds after the VM has booted. As a result, there is a
risk that the VM won't receive an IP address from DHCP in time.
This patch changes the default value for agent.minimize_polling to
True. This change should reduce the time needed for configuring
an interface on br-int consistently.
Terry Wilson [Wed, 20 Nov 2013 15:55:02 +0000 (09:55 -0600)]
Add configurable ovsdb monitor respawn interval
If minimize_polling=True and the ovsdb-client process died, the
default respawn interval of 0 would mean that we'd start polling
again. This patch adds the option ovsdb_monitor_respawn_interval and
defaults it to 30 seconds.
Terry Wilson [Tue, 22 Oct 2013 18:22:18 +0000 (13:22 -0500)]
Ensure get_pid_to_kill works with rootwrap script
To ensure that correct process is killed when using a rootwrap
script, we must recursively list the children of our top-level
process and kill the last one. This patch uses the psutil python
module which is already used in the heat-cfntools project.
Evgeny Fedoruk [Mon, 28 Oct 2013 17:43:10 +0000 (10:43 -0700)]
Adds tests, fixes Radware LBaaS driver as a result
Adding more tests for Radware LBaaS driver.
Adding new exception module for the Radware lbaas driver.
The base radware lbaas exception, called RadwareLBaasException,
Several specific exceptions for different failures.
Driver was changed for using new exceptions as well.
Changing the way OperationsHandler obtains context.
Always waiting 1 second before handling the operation
next time, to prevent busy-wait requests on vDirect.
Several code optimizations were done as well.
Due to timing issues, when the agent synchronizes
with the server wrt the representation of server's
and agent's networks, networks may have already
been deleted from the db. In such circumstances,
it is more appropriate to emit warnings rather than
full-blown exceptions as the agent handles these
circumstances just fine.
Édouard Thuleau [Mon, 18 Nov 2013 15:31:25 +0000 (15:31 +0000)]
Fix OVS agent reclaims local VLAN
If a port disappears on an OVS agent, the port is removed of the lvm
vif_ports list. And if it's the last port of the network on this agent,
the network local VLAN is reclaim.
Oleg Bondarev [Wed, 6 Nov 2013 09:24:43 +0000 (13:24 +0400)]
LBaaS: fix reported binary name of a loadbalancer agent
Loadbalancer agent's actual binary name differs from what it reports
to Neutron server, so need to fix:
neutron-loadbalancer-agent -> neutron-lbaas-agent
NVP plugin:fix connectivity to fip from internal nw
The current set of NAT rules configured in the NVP logical router
prevents instances on an internal network from establishing TCP
connections with a floating IP associate with an internal port
on the same Neutron network.
This patch add a SNAT rule to ensure connections coming from the
internal network always appear to the port associate with the
floating IP as coming from the external network.
Misconfiguration of the policy.json file may
cause policy check failures. It's kind to the
developer to log the underlying exception
so that he/she can have more information as to
how to address the problem.
This fix addresses improper behavior with the Cisco Nexus plugin's
selection of Nexus switch on which to place a Switch Virtual Interface
(SVI) when round-robin switch placement is enabled.
The expected behavior when round-robin SVI switch selection is configured
via the cisco_plugins.ini file, i.e.:
[cisco]
nexus_l3_enable = True
svi_round_robin = True
is that when a virtual router interface is created, the Nexus plugin should
select the Nexus switch with the least number of SVI interfaces configured
for creating the new SVI. The current selection is based on the first
entry in a dictionary, and is therefore indeterminate.
Similarly, this fix also addresses incorrect behavior when round-robin
selection is disabled. In this case, the desired behavior is that
the plugin should select the first switch which appears in the Nexus
switch configuration. Instead, the current selection is also based on the
first entry in a dictionary, and is likewise indeterminate.
Tune up report and downtime intervals for l2 agent
If the neutron server erroneously thinks than the l2 agent is down
it will fail to bind a port, which can lead to VM's spawn errors.
However, the issue is only transient because the agent effectively
is only 'late' in reporting back.
Best solution would be an alpha-count algorithm (so that we can detect
persistent failures more reliably), but for now let's be more tolerant
assuming that the agent is down by waiting at least twice the report
interval plus a tiny teeny bit.
The IntegrityError faced on network deletion that
spooks Tempest tests is most likely caused by the
fact that the ml2 plugin does a dirty read. By
adding a 'select for update' we should be able to
address the issue once and for all.
Also, there's a chance that the dhcp port gets
reallocated while we are deleting the network. To
this aim, catch the integrity error and attempt
to recover from it.
This patch also removes the handling of errors
on concurrent reads that can no longer occur when
deleting the network.
Eugene Nikanorov [Wed, 13 Nov 2013 10:54:56 +0000 (14:54 +0400)]
Move Loadbalancer Noop driver to the unit tests
Move Loadbalancer Noop driver to the corresponding folder in
unit tests to clearly indicate that it is an utility driver
that only suitable for unit testing.
This patch addresses minor cleanups which are the diff between the
original version of the patch which was merged into havana master
branch and the patch that is submitted for merge into stable/havana.
The original patch that was merged into havana master branch is at:
https://review.openstack.org/#/c/49086/
The new patch which has been submitted as havana-backport-potential is:
https://review.openstack.org/#/c/54447/
This whole excercise came into play because the original patch was not
picked up in havana-rc2 because of missing tag in the bug. Therefore, the
need to submit new patch against stable/havana.
When the new patch was submitted for havana-backport-potential, few very
minor previously commented cleanups were incorporated as well. This
patch brings these minor cleanups into master branch as well. Therefore,
merge of these two patches will bring both master branch and
stable/havana at parity.
chen-li [Tue, 12 Nov 2013 01:17:17 +0000 (09:17 +0800)]
Remove the warning for Scheduling Network
when a new port is created, the schedule_network in agentschedulers_db is called.
Since this network may already be hosted, it will directly return None in dhcp_agent_scheduler,
which cause the agentschedulers_db.schedule_network log a warning message.
This is really annoying and making users confused.
And, real warnings are already addressed in the real scheduler function.
which is neutron.scheduler.dhcp_agent_scheduler.ChanceScheduler.schedule by default.
Joe Gordon [Mon, 11 Nov 2013 18:32:34 +0000 (10:32 -0800)]
Cleanup HACKING.rst
* Point to new location for hacking doc
(http://docs.openstack.org/developer/hacking/)
* Remove openstack-common section because already in main hacking doc
Arata Notsu [Mon, 11 Nov 2013 11:33:43 +0000 (20:33 +0900)]
Remove confusing comment and code for LBaaS
The comment "the driver is optional" is inconsistent with what actually
done. And "vif_driver = None" after raising an exception makes no sense.
So this patch removes these lines.
Carl Baldwin [Fri, 27 Sep 2013 04:04:31 +0000 (04:04 +0000)]
Refactor configuring of floating ips on a router
This approach to configuring floating ips is stateless and idempotent.
This allows it to handle corner cases, such as reusing a floating ip
address with a different floating ip id in a way that is easier to
understand.
The concept is to wipe the floating ips clean and rebuild them each
time with the following optimizations. To avoid bad performance in
manipulating iptables, it is called in the context of a call to
defer_apply_on. To avoid a disruption in network flow a set
difference is use to determine the set of addresses that no longer
belong on the inteface rather than removing them all blindly.
Andreas Jaeger [Sun, 3 Nov 2013 16:31:29 +0000 (17:31 +0100)]
Remove database section from plugin.ini
Change https://review.openstack.org/#/c/34515 moved the database
config items to neutron.conf but left some commented out
[database] items. Remove them as well.
Chang Bo Guo [Thu, 31 Oct 2013 05:10:34 +0000 (22:10 -0700)]
sync log from oslo
5fef5a8105 allow keeping of existing loggers with fileConfig fb8075a19d Add amqp=WARN,qpid=WARN to default_log_levels 4654a5d247 Don't override default value for eventlet.wsgi.server logging 41ddd7a975 _get_log_file_path explictly return, when logfile/logdire unset e12e6b45f8 Make openstack.common.log Python 3 compatible 572cfecb4d Make Messages unicode before hitting logging 3243cdfbe9 python3: handle module moves in log
Joe Mills [Mon, 28 Oct 2013 08:08:20 +0000 (08:08 +0000)]
Use correct device_manager member in dhcp driver
* The DHCP driver used to use device_delegate, but that has
changed to device_manager. referencing device_delegate
caused the cleanup of the dhcp agent namespaces to fail.
This fixes the issue by using the correct member name,
device_manager