2012-10-09 16:07:35 ERROR [quantum.api.v2.resource] create failed
Traceback (most recent call last):
File "/opt/stack/quantum/quantum/api/v2/resource.py", line 95, in resource
result = method(request=request, **args)
File "/opt/stack/quantum/quantum/api/v2/base.py", line 331, in create
obj = obj_creator(request.context, **kwargs)
File "/opt/stack/quantum/quantum/db/l3_db.py", line 154, in create_router
return self._make_router_dict(router_db)
File "/opt/stack/quantum/quantum/db/l3_db.py", line 131, in _make_router_dict
nw_id = router.gw_port['network_id']
TypeError: 'NoneType' object has no attribute '__getitem__'
This has to do with some unexpected behavior from SQLAlchemy in which the "gw_port" relationship on the Router object is not loaded in create_port(), even though the router['gw_port_id'] is populated. Very similar logic for update_port() seems to behave correctly, so this requires more investigation (ideally by someone who understands sqlalchemy relationships well)
Yes, I see this following traceback:
2012-10-09 16:07:35 ERROR [quantum. api.v2. resource] create failed quantum/ quantum/ api/v2/ resource. py", line 95, in resource request= request, **args) quantum/ quantum/ api/v2/ base.py" , line 331, in create request. context, **kwargs) quantum/ quantum/ db/l3_db. py", line 154, in create_router router_ dict(router_ db) quantum/ quantum/ db/l3_db. py", line 131, in _make_router_dict gw_port[ 'network_ id']
Traceback (most recent call last):
File "/opt/stack/
result = method(
File "/opt/stack/
obj = obj_creator(
File "/opt/stack/
return self._make_
File "/opt/stack/
nw_id = router.
TypeError: 'NoneType' object has no attribute '__getitem__'
This has to do with some unexpected behavior from SQLAlchemy in which the "gw_port" relationship on the Router object is not loaded in create_port(), even though the router[ 'gw_port_ id'] is populated. Very similar logic for update_port() seems to behave correctly, so this requires more investigation (ideally by someone who understands sqlalchemy relationships well)