Enable Quota DB driver by default

Closes-Bug: #1189671

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.

Change-Id: I9e20961d5a6322361e3c0284b3c2a7ca86755c70
change port status only if port is bound to the good host

if host is set in the rpc message update_device_up/down sent by the agent,
the port status will be changed only if the port is bound to the host.

Change-Id: I0e607c734fbebf0b69f83c3bbd3e25a9783672dc
Closes-Bug: #1224967
BigSwitch: sync state on disassociate floating ip

Sends the state of port's parent network to the backend controller
when a floating IP is disassociated from a port.

Closes-Bug: #1235074
Change-Id: I8375e6564b5d08f1adc7e7aef6affc97c8d03c5e
(cherry picked from commit 0bae949eed229613c77c4943edbf68c1c140f977)
Avoid race with udev during ovs agent startup

After taking down the veth link between the physical bridge and the integration
bridge call udevadm settle to wait for any udev events to be completely
processed by the operating system before recreating the veth pair.

Some distributions (e.g. openSUSE) have udev rules installed by default that
call e.g. ifdown <interface> during the remove event. If that is processed
after the ovs agent already brought up the veth pair again the veth pair's
link will be down after the agent completed startup and networking will be
broken for all VM instances.

Change-Id: I95520ea96a9804c5261a0c994bbca137535cc37c
Closes-Bug: #1218556
(cherry picked from commit 8d88ee7411d43f148b45d0a145fe32a75765a3ac)
Prevent L3 agent looping calls from hanging

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.

Change-Id: I003316bce0f38b7d2ea7d563b5a0a58676834398
Partial-Bug: 1224001
(cherry picked from commit 591ee00a67fbbe5f106ba12140b9f9420dee5907)
Merge "Avoid race with udev during ovs agent startup" into milestone-proposed
Merge "Enable Quota DB driver by default" into milestone-proposed
Update ML2 README file for havana

Closes-Bug: 1235308
Change-Id: I684581c00ff28bc9cdb36034a9a970275b0a0090
(cherry picked from commit 2d7e2756271fff6413a572e11f9248465f23f1bb)
NEC plugin: Fix nec-agent unexpected exit due to RPC exception

Changes nec-agent to catch RPC exceptions in the main
daemon loop. It fixes the following two bugs.

- nec-agent dies with RPC timeout in secgroup RPC
  (Closes-Bug: #1235106)

- port_added message can be dropped when RPC timeout occurs
  (Closes-Bug: #1235111). Moves exception catch from PluginApi
  to the main daemon loop.

Change-Id: I12394b739fc35bff271543f4625c5e3152e534ae
(cherry picked from commit 3df505e448d38929c20721b22d81e47bf917af6a)
Fix l2 pop doesn't propagate ip address updates

Propagates ip address changes when an ip address is :
added, removed, or changed.
Add a new rpc call for the updates of forwarding informations.

Fixes: Bug #1234137
Change-Id: Ib5b971bd02f20a0ea73f88ce9685e944226bb5a2
(cherry picked from commit e6a368a697e936f40a0882b236b2be17e1520436)
Set correct plugin support in Embrane based plugins

Change-Id: I87480415f55894e17458a85ef7918babaceb5e47
Closes-Bug: 1236627
(cherry picked from commit 15103e58443af95451a9ba22bc4a9083950d386e)
Merge "Set correct plugin support in Embrane based plugins" into milestone-proposed
Merge "BigSwitch: sync state on disassociate floating ip" into milestone-proposed
Add clear_db to cleanup for TestCiscoNexusPlugin

Fixes Bug: #1234012
Change-Id: I0829f04ac1a0760d96babcb1154f4f569a0f848f
(cherry picked from commit b4167ed095dbd47a137ff22674ae13aba3a50513)
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

Closes-bug: #1231914
Change-Id: Ifc95f901d4222b76a4254e21295829ac8d82493b
(cherry picked from commit 3568a9cac73a2da19e86d82f561be10ae9dbe9a0)
Merge "Update ML2 README file for havana" into milestone-proposed
Merge "Add clear_db to cleanup for TestCiscoNexusPlugin" into milestone-proposed
Merge "NEC plugin: Fix nec-agent unexpected exit due to RPC exception" into milestone-proposed
Merge "Add a route to reach the MD server when a subnet is created" into milestone-proposed
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.

Change-Id: I856c46631e495d513065fc9e987898408441a21e
Closes-Bug: #1231913
(cherry picked from commit f4b78c7f17e29448ed54b136eeb4ac700b324120)