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).
Dan Prince [Fri, 30 Nov 2012 21:13:51 +0000 (16:13 -0500)]
Use /usr/bin/ for the metadata proxy in l3.filters
Updates the l3.filters proxy to use /usr/bin/ instead
of /usr/local/bin. This should be a more distro friendly
default and follows the pattern used by other OpenStack
services as well.
This patch makes sure that a route entry for dnsmasq is placed first
before any others (for example the l3-agent one). This makes DHCP work
when network namespaces are disabled.
also fixes bug 1083180, which has L3 plugin base class implement
get_*_count methods and raise
NotImplemented, which is the "right" thing to do from a
code-as-documentation perspective.
Yaguang Tang [Tue, 27 Nov 2012 08:55:32 +0000 (16:55 +0800)]
Use auth_token middleware in keystoneclient.
The auth_token middleware moved into keystoneclient so a full
keystone install is not required to use the middleware.Also
add missing signing_dir to api-paste.ini.
Iryoung Jeong [Mon, 26 Nov 2012 04:56:36 +0000 (13:56 +0900)]
Removing unnecessary setUp()/tearDown() in SecurityGroupsTestCase
This patch removes not required setUp()/tearDown() functions in
SecurityGroupsTestCase. The functions are almost identical in
test_db_plugin.QuantumDbPluginV2TestCase. Only difference is initializing
ext_mgr which is done by SecurityGroupDBTestCase.setUp().
And redundant inheritance of unittest2.TestCase for SecurityGroupsTestCase
is fixed.
Dan Prince [Mon, 26 Nov 2012 03:01:27 +0000 (22:01 -0500)]
Don't force run_tests.sh pep8 only to use -N.
Previously running run_tests.sh -p would *always* run
outside of the virtual environment. This commit makes -p
work equally well with -N (no-virtual-env) and -V (virtual-env).
Iryoung Jeong [Thu, 22 Nov 2012 03:58:47 +0000 (12:58 +0900)]
Updates tearDown() to release instance objects
This change fixes the bug by releasing the objects of the instance
of class QuantumDbPluginV2TestCase. Removing unnecessary objects
explicitly reduces the memory required by unit tests.
Bob Kukura [Tue, 13 Nov 2012 18:50:53 +0000 (13:50 -0500)]
Improve openvswitch and linuxbridge agents' parsing of mappings
Created generic quantum.utils.parse_mappings function that detects
duplicate key or value strings, and changed openvswitch and
linuxbridge agents to use this to parse their mappings from physical
networks to bridges or interfaces. Fixes bug 1067669.
Dan Prince [Mon, 5 Nov 2012 16:57:53 +0000 (11:57 -0500)]
Move extension.py into quantum/api.
This change moves extensions.py out of the extensions module
and into the api module. This resolves an issue where the
following log WARNING message would occur each time the Quantum
API starts:
Did not find expected name "Extensions" in
/usr/lib/python2.7/site-packages/quantum/extensions/extensions.py
gongysh [Fri, 9 Nov 2012 14:45:58 +0000 (22:45 +0800)]
Fix context problem
On plugin side, we use normal API context if any to call RPC methods.
We use our plugin dispatcher to convert RPC context into quantum admin
context. After that the callback's functions have the first argument context
as normal quantum context.
On agent side, we use admin context without session property as its
RPC calling context. Call back context is default RPCCommonContext in
Openstack common modules.
This patch also fixes the problem in the following bug:
Dan Wendlandt [Tue, 20 Nov 2012 22:09:19 +0000 (14:09 -0800)]
bug 1057844: improve floating-ip association checks
allow multiple floating ips to be associated with the same internal port
as long as they map to different external nets (not yet supported in
Folsom) or different internal fixed IPs. With Quantum, there is no
need to disallow either scenario.
Also improve check for a valid external network to router to internal
subnet path when a floating IP is bound.