Implements the provider network extension support. The list of valid network
types has been updated to reflect the types supported by the nvp plugin.
This was necessary otherwise validation would have always failed.
Multiple logical switches might be associated with a quantum network; the
first logical switch will always have the same id as the quantum network.
Also now raises exception when port limit on overlay network is reached.
This patch also adds a check for the maximum number of ports on 'standard'
overlay networks, and performs some code refactoring for improving
maintanability. For instance the NVPCluster class has been moved into its own
module.
Implementing string representation for model classes
We want to have meaningfull representation. This is
useful when we debug and want to see the actual
attributes of the object. The current __repr__
of those classes is the default python implementation
and does not provide
information about the object attributes.
Solve Bug #1084231
Change-Id: I1ea5d741d2fd2da13712e0d51d2c73dfba4991cf
Solve the conflict below:
Conflicts:
quantum/tests/unit/test_db_plugin.py
In the OVS and LB plugins there are cases when accessing the network
has an additional database query. The patch enables this to occur
without accessing an invalid database entry.
The utility should be called after rebooting an appliance. This
will purge the openvswicth of configured tap devices.
A configuration variable quantum_ports has been added. This is
by default True which indicates that only Quantum ports will be
deleted from the OVS. If this is set as False then all ports on the
bridge will be deleted.
Gary Kotton [Mon, 10 Dec 2012 12:39:22 +0000 (12:39 +0000)]
Add eventlet db_pool use for mysql
This adds the use of eventlet's db_pool module so that we can make mysql
calls without blocking the whole process.
New config options are introduced:
sql_dbpool_enable -- Enables the use of eventlet's db_pool
sql_min_pool_size -- Set the minimum number of SQL connections
sql_max_pool_size -- Set the maximum number of SQL connections
sql_idle_timeout -- Timeout before idle sql connections are reaped
The default for sql_dbpool_enable is False for now, so there is
no forced behavior changes for those using mysql. sql_min_pool_size
is defaulted to 1 to match behavior if not using db_pool.
Jason Zhang [Tue, 11 Dec 2012 02:04:18 +0000 (18:04 -0800)]
Fixed the unit tests using SQLite do not check foreign keys.
The foreign key constraints will be enabled for each SQLite
database connection.
By default the foreign key constraints are disabled in SQLite,
so some test cases failed after enabling the foreign key
constraints for unit tests. This fixings also fixed the failed
test cases because of the foreign key enforcement.
Aaron Rosen [Thu, 13 Dec 2012 18:53:07 +0000 (10:53 -0800)]
dhcp.filters needs ovs_vsctl permission
The dhcp agent calls ovs_vsctl so it will fail if using rootwrap
and these aren't specified. The reason why this was working using
rootwrap before is because there are other filters in
etc/quantum/rootwrap.d that specifiy ovs_vsctl which
allows the agent to make those calls. Fixes bug 1090072
Isaku Yamahata [Wed, 12 Dec 2012 03:18:27 +0000 (12:18 +0900)]
plugins/ryu: l3 agent rpc for Ryu plugin is broken
Bug 1089221
This is the Ryu counter part of
https://review.openstack.org/#/c/15619/
Change id of I60f3081975fc7164b22f9e9fa941e702a3f4c663
Change set of 36e71eb1d2136795817ead27e1d9fa0ce65f6e
Isaku Yamahata [Wed, 12 Dec 2012 03:02:53 +0000 (12:02 +0900)]
pluins/ryu: Fixes context exception in Ryu plugin
Bug 1089220
This is the Ryu counter part of
https://review.openstack.org/#/c/15726
Change-ID of I913b48dcd84d275cd7de30ca990be00c243e63ea,
changeset of 05383d1340aecd7192609a9197c249886d844a46
Iryoung Jeong [Thu, 22 Nov 2012 03:58:47 +0000 (12:58 +0900)]
Releasing resources of context manager functions if exceptions occur
The functions using decorator @contextlib.contextmanager in files below
has potential resorce leaks when exceptions occur.
- quantum/tests/unit/test_policy.py
- quantum/tests/unit/test_db_plugin.py
- quantum/tests/unit/test_l3_plugin.py
- quantum/tests/unit/test_extension_security_group.py
This patch let them releasing resources correctly.
gongysh [Mon, 12 Nov 2012 12:28:16 +0000 (20:28 +0800)]
l3 agent rpc
On one hand, we sync router data (including routers,
their gw ports, interfaces and floatingips) from l3_agent
to quantum server periodically if needed.
On the other hand, we notify l3 agent from quantum server when
we delete or update a router's stuff, such as floating IP,
interface and gwport and router itself.
Maru Newby [Tue, 4 Dec 2012 00:27:53 +0000 (00:27 +0000)]
Fix rootwrap cfg for src installed metadata proxy.
* The metadata proxy script will be installed to /usr/local/bin
if installed from source, rather than the default /usr/bin.
The filter config needs to be updated to reflect this or
invacation of the proxy by the l3 agent will fail.
Live-migration with Ryu plugin doesn't work because the unique constraint of
PortBinding table is violated as follows.
Now Ryu can handle those informations itself, so remove the table itself and
simplify Ryu plugin.
> ERROR [quantum.api.v2.resource] update failed
> Traceback (most recent call last):
> File "/quantum/api/v2/resource.py", line 95, in resource
> result = method(request=request, **args)
> File "/quantum/api/v2/base.py", line 397, in update
> obj = obj_updater(request.context, id, **kwargs)
> File "/quantum/plugins/ryu/ryu_quantum_plugin.py", line 226, in update_port
> port_binding.dpid, port_binding.port_no))
> InvalidInput: Invalid input for operation: invalid (datapath_id, port_no) requested (00002eab88ec5140, 4), but (0000c2f19014c74a, 1).