Nachi Ueno [Fri, 11 Oct 2013 18:46:32 +0000 (11:46 -0700)]
Use L3 api from vpn ipsec driver via service plugin
VPNaaS and ML2 plugin won't work, because ML2 plugin
supports service version of L3.
In this commit, we modify ipsec driver to use L3 plugin.
This is also backward compatible change, because if L2 plugin
supports L3 get_service_plugin API returns L2 plugin.
ML2 plugin changes the port status to "build" when get_device_details
is called. For this reason, the port status must be updated once the
port details are processed.
Bob Kukura [Thu, 3 Oct 2013 16:25:24 +0000 (12:25 -0400)]
Fix auto-deletion of ports when deleting subnets in ML2
When a subnet is deleted, certain ports referencing it are
auto-deleted. The implementation of NeutronDBPluginV2.delete_subnet()
does this at the DB level, so ML2's mechanism drivers were not being
called.
Ml2Plugin.delete_subnet() is changed to not use the base class's
method, and to auto-delete ports by calling its own delete_port()
method outside of the transaction. A loop avoids race conditions with
ports being asynchronously added to the subnet.
The logic in Ml2Plugin.delete_network() is also fixed to properly
handle auto-deleting ports and subnets, and debug logging is added to
the various delete methods.
Kevin Benton [Wed, 9 Oct 2013 06:02:20 +0000 (23:02 -0700)]
BigSwitch: correct net to backend on floating IP disassociation
The corrects the network that is updated on the backendw when a
floating IP is disassociated. It was incorrectly sending the
tenant's network when the update is to the external network the
floating address belongs to.
Akihiro MOTOKI [Wed, 9 Oct 2013 10:50:35 +0000 (19:50 +0900)]
Fallback to Quota Conf Driver if Quotas table is not defined
commit de15e0b9c5 enabled Quota DB driver default considering
production environments, but it breaks plugins without per-tenant
quota extension. In these plugin quotas tables is not loaded.
This commit fallbacks to ConfDriver if Quota model is not loaded by
checking neutron.db.quota_db which defines Quota model is imported.
Zhongyue Luo [Wed, 25 Sep 2013 02:24:32 +0000 (10:24 +0800)]
Utilizes assertIn
Using assertTrue and the 'in' operator to test
if an element is in a sequence is too python2.4.
Our unit testing framework supports assertIn
which was created for these types of tests.
Zhongyue Luo [Fri, 6 Sep 2013 07:29:38 +0000 (15:29 +0800)]
Utilizes assertNotIn
Using assertTrue and the 'not in' operator to test
if an element is in a sequence is too python2.4.
Our unit testing framework supports assertNotIn
which was created for these types of tests.
Aaron Rosen [Tue, 8 Oct 2013 19:24:21 +0000 (12:24 -0700)]
Fix dhcp_release lease race condition
There is a possible race condition when delete or updating fixed_ips
on ports where an instance could renew its ip address again after
dhcp_release has already been executed. To fix this, the order of
reload_allocation and release_lease need to be switched. This way an
instance will not be able to renew it's ip address after it is
removed from the host file.
This patch adopts several measures to prevent _sync_routers_task
and _rpc_loop from hanging because of subprocess.Popen.communicate
not returning.
1) Perform a sleep everytime a command is completed, similarly to
what is done in openstack.common.processutils.execute
2) Disable by default GARP, as kernel crashes caused by arping
have been observed
3) Prevent a non-critical keyerror in _router_removed from triggering
again a full sync, which might put the system under significant load.
This patch also adds debug log statements aimed at improving the
ability of debugging similar failures.
Dave Cahill [Fri, 27 Sep 2013 10:44:00 +0000 (10:44 +0000)]
Disassociate floating IPs from port on terminate
Bugfix - floating IPs were left associated after VM
was terminated. Now call disassociate_floatingips
within delete_port as in other networking plugins.
Add L3NatDBIntTestCase suite to cover the
floating IP disassociation case, and fix all failing
tests from that suite.
Quota driver is now loaded in lazy mode, i.e. the driver is loaded
the first time the driver is accessed. This is to make unit tests
work. Some unit tests like extension test cases need to use Config
Quota driver (previous default) but QuotaEngine is initialized
when quota.py is imported. Thus the unit tests had no chance to
specify quota_driver.
Bob Kukura [Fri, 4 Oct 2013 20:17:37 +0000 (16:17 -0400)]
Change rpc_support_old_agents default to False
Changes the rpc_support_old_agents config variable default value to
False, so that the vlan_id field (redundant with the segmentation_id
field) is no longer included in RPC messages from the linuxbridge and
mlnx plugins to their corresponding L2 agents. This can be set to True
if needed to support L2 agents older than midway through the havana
cycle.
Add a route to reach the MD server when a subnet is created
When the first subnet is created, the dhcp port is created and
midonet plugin correctly adds the static route to reach the MD
server in create_port. When a second or following subnets are
created, a new ip is added to the dhcp port. This patch takes
care of adding the static route to correcly reach the MD server
in update_port. This fixes the problem of VMs not being able to
reach the MD if assigned to the second subnet
Zhongyue Luo [Fri, 6 Sep 2013 08:00:59 +0000 (16:00 +0800)]
Utilize assertIsInstance
Using assertTrue and the 'isinstance' function to test
if an object is in an instance of some class is too python2.4.
Our unit testing framework supports assertIsInstance which was created
for these types of tests. Let's use assertIsInstance for these tests.
Zhongyue Luo [Fri, 6 Sep 2013 07:18:49 +0000 (15:18 +0800)]
Utilizes assertIsNone and assertIsNotNone
Using assertTrue and the 'is' operator to test if an element is None
is too python2.4. Our unit testing framework supports
assertIsNone and assertIsNotNone which were created
for these types of tests.