There is really no problem with this change. However, it is probably
triggering a port_update notification to the agent for each port
with an allocated IP.
The agent handles that notification in a way which might be improved
from a scalability perspective.
I don't actually want this change to removed, I am just checking
whether neutron without it passess jobs.
This patch adds some debug logging statements aimed at profiling
tasks in the agent's main rpc loop.
These logging capabilities will help gain some better insights into
the performance bottlenecks of the agent.
Zhenguo Niu [Thu, 28 Nov 2013 15:12:00 +0000 (23:12 +0800)]
Updates .gitignore
To ignore swap files from getting into repository
currently the implemented ignores are *.swp and *.swo
however vim adds more swap files if these files exists,
so improving this with *.sw?
Maru Newby [Wed, 27 Nov 2013 07:57:48 +0000 (07:57 +0000)]
Stop logging unnecessary warning on context create
The context was previously logging at the 'warn' level when unknown
kwargs were being passed to its __init__(). Since the agents were
passing tenant=None with each rpc request, this was generating an
unreasonable amount of log chatter that would not be useful to an
operator. The fix is to log at the debug level instead so that
the operators don't see the output by default but developers can
still choose to.
Eugene Nikanorov [Thu, 28 Nov 2013 08:46:41 +0000 (12:46 +0400)]
Avoid loading policy when processing rpc requests
When Neutron server is restarted in the environment where multiple agents
are sending rpc requests to Neutron, it causes loading of policy.json
before API extensions are loaded. That causes different policy check
failures later on.
This patch avoids loading policy when creating a Context in rpc layer.
Akihiro Motoki [Wed, 27 Nov 2013 10:09:01 +0000 (19:09 +0900)]
Mocking ryu plugin notifier in ryu plugin test
Previously RPC notifier is not mocked in ryu plugin test and the
plugin tries to send RPC notifications. It may interact with
impl_fake RPC set up in previous tests by other plugin
and sometimes leads to unexpected ovs-vsctl invoking.
Maru Newby [Mon, 25 Nov 2013 17:35:54 +0000 (17:35 +0000)]
Fix format errors seen in rpc logging
The previous commit for this bug didn't include the 'project_name'
key in the context dict. The missing key was causing the amqp
module to generate log formatting exceptions instead of normal
log output.
Separately, the context module itself was generating logging
exceptions in the quantum service when logging was attempted
before the context was fully initialized
This patch ensures allowed address pairs bindings are refreshed
only when they actually change.
This will also avoid sending a notification to the agent if no
change actually occured.
Monty Taylor [Mon, 11 Nov 2013 09:30:54 +0000 (04:30 -0500)]
Replace stubout with fixtures
blueprint remove-mox
The last step in removing mox is to remove stubout usage. Lucky for us,
the fixtures library, which we are already using, can take on the
challenge quite well.
dekehn [Thu, 21 Nov 2013 05:03:51 +0000 (22:03 -0700)]
Mock the udevadm in the TunnelTestWithMTU test
When running the neutron.tests.unit.openvswitch.test_ovs_tunnel.
TunnelTestWithMTU unit test failure occurs because the udevadm is
timing out waiting on a mock-ed device.
Avoid dhcp agent race condition on subnet and network delete
Ensure that ports that are about to be deleted are 'selected
for update'. By doing so, we avoid a race condition between
subnet and network delete operations carried out by two
separate server instances.
A race caused by the dhcp agent deleting the DHCP port
(caused by a subnet-delete event notification) can
still occur and will be addressed in a subsequent patch.
delete_subnet's way to delete ports has been tweaked to
ensure that postgres db can handle the SELECT FOR UPDATE
correctly.
Ilya Pekelny [Fri, 22 Nov 2013 12:04:26 +0000 (14:04 +0200)]
Sync openstack.common.local from oslo
`local` has a broken TLS symbol - strong_store, fixed in oslo some time ago in
Ib544be1485823f6c619312fdee5a04031f48bbb4. All direct and indirect
(lockutils and rpc) usages of strong_store might be potentially affected.
Original change to Nova: If4dd973acc23921dbc2bc69bb76225deb2802dad
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.
Joe Mills [Wed, 25 Sep 2013 08:43:30 +0000 (08:43 +0000)]
Do not add DHCP info to subnet if DHCP is disabled
Currently the midonet plugin will add default DHCP information to
each subnet even if the subnet is configured to have DHCP disabled.
This change addresses this by checking the DHCP settings while
creating a subnet, and only adding DHCP information if DHCP is
enabled.
Handle IPAddressGenerationFailure during get_dhcp_port
If a network/subnet is deleted while the dhcp agent is trying
to get/create a dhcp port for that network, the exception
will be raised because no IP Allocation Range is available.
However, this particular failure mode causes just noise, because
the dhcp agent can cope with it without problems.
A follow-up patch will deal with the other exception traces during
create_dhcp_port
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.
Carl Baldwin [Tue, 12 Nov 2013 19:31:45 +0000 (19:31 +0000)]
Optionally delete namespaces when they are no longer needed
Adds a configuration option to tell the network agents to delete
namespaces when they are no longer in use. The option defaults to
False so that the agent will not attempt to delete namespaces in
environments where this is not safe.
This has been working well in deployments where iproute2 has been
patched with commit 58a3e8270fe72f8ed92687d3a3132c2a708582dd or it is
new enough to include it without being patched.
Amir Sadoughi [Thu, 5 Sep 2013 06:38:41 +0000 (01:38 -0500)]
Added check on plugin.supported_extension_aliases
Added check to neutron.api.extensions.PluginAwareExtensionManager
which raises an exception when an alias in the plugin's
`supported_extension_aliases` list is not found in the set of loaded
extension aliases. If an alias is missing, it means the extension for
that alias has not been loaded, has not been found, and the file is
missing from paths listed in `oslo.config.CONF.api_extensions_path`.
This guards against a common class of bugs in plugins,
such as typographical errors in the `supported_extension_aliases`
property.
Plugin changes:
* bigswitch.plugin: Moves api_extensions_path override to plugin's
__init__ method, similar to other plugins.
* cisco.n1kv.n1kv_neutron_plugin: Removes "policy_profile_binding" and
"network_profile_binding" as they don't exist in Neutron currently.
Removed override of api_extensions_path as it is loaded through
cisco.network_plugin.
* cisco.network_plugin: Renames "Cisco Credential" to "credential".
Adds api_extension_path override to plugin's __init__ method.
* metaplugin.meta_neutron_plugin: Avoids alias of empty string when
cfg.CONF.META.supported_extension_aliases is an empty string.
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