When DHCP agent creates port from neutron and another create port request is received, ResourceClosedError occurs in sqlalchemy.
this may be related to bug #1282922https://bugs.launchpad.net/bugs/1282922
Above bug is related to nec plugin and it is mentioned that other plugins may be affected.
This error occurred in ML2 plugin both for create and delete ports.
Tested using 2014.3 Icehouse
When DHCP agent creates port from neutron and another create port request is received, ResourceClosedError occurs in sqlalchemy.
this may be related to bug #1282922 https:/ /bugs.launchpad .net/bugs/ 1282922
Above bug is related to nec plugin and it is mentioned that other plugins may be affected.
This error occurred in ML2 plugin both for create and delete ports.
Tested using 2014.3 Icehouse
Neutron User Neutron DHCP Agent ------- ------- |
|------ ------- ------> | | ------- ------> |
|<----- ------- ------- | |
| | |
| | DHCP VPort |
| | Create Port Req |
| |<-----
| VPort | |
| Create Port Req | |
| |* Conflict |
| | |
| | |
| | Create Port Resp |
| |------
| Create Port Resp | |
| *Error Response | |
| | |
| | |
2014-10-15 21:58:59.837 26167 INFO neutron.wsgi [-] (26167) accepted ('172.16.2.86', 47007)
2014-10-15 21:58:59.870 26167 INFO neutron.wsgi [req-424a01ca- f52b-43a6- 8844-d0d3590feb 8d None] 172.16.2.86 - - [15/Oct/2014 21:58:59] "GET /v2.0/networks. json?fields= id&name= testnw2 HTTP/1.1" 200 251 0.031936
2014-10-15 21:58:59.872 26167 INFO neutron.wsgi [req-424a01ca- f52b-43a6- 8844-d0d3590feb 8d None] (26167) accepted ('172.16.2.86', 47008)
2014-10-15 21:58:59.950 26167 INFO neutron.wsgi [req-7ee742ef- 6370-46b3- 8f8b-f46ae5d262 bc None] 172.16.2.86 - - [15/Oct/2014 21:58:59] "POST /v2.0/subnets.json HTTP/1.1" 201 572 0.076879
2014-10-15 21:59:00.074 26167 INFO neutron.wsgi [req-a6ef6c65- 811f-40d8- 9443-b959080999 4a None] (26167) accepted ('172.16.2.86', 47010)
2014-10-15 21:59:00.088 26167 INFO urllib3. connectionpool [-] Starting new HTTPS connection (1): 10.68.42.86 f454-423d- bb7b-b4c7e2e6e0 8c None] 172.16.2.86 - - [15/Oct/2014 21:59:00] "GET /v2.0/networks. json?fields= id&name= testnw2 HTTP/1.1" 200 251 0.033298
2014-10-15 21:59:00.111 26167 INFO neutron.wsgi [req-22a84d34-
2014-10-15 21:59:00.113 26167 INFO neutron.wsgi [req-22a84d34- f454-423d- bb7b-b4c7e2e6e0 8c None] (26167) accepted ('172.16.2.86', 47012)
2014-10-15 21:59:51.165 26167 ERROR neutron. api.v2. resource [-] create failed api.v2. resource Traceback (most recent call last): api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ api/v2/ resource. py", line 87, in resource api.v2. resource result = method( request= request, **args) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ api/v2/ base.py" , line 448, in create api.v2. resource obj = obj_creator( request. context, **kwargs) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ plugins/ ml2/plugin. py", line 632, in create_port api.v2. resource result = super(Ml2Plugin, self).create_ port(context, port) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ db/db_base_ plugin_ v2.py", line 1371, in create_port api.v2. resource ips = self._allocate_ ips_for_ port(context, network, port) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ db/db_base_ plugin_ v2.py", line 678, in _allocate_ ips_for_ port api.v2. resource result = NeutronDbPlugin V2._generate_ ip(context, subnets) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ db/db_base_ plugin_ v2.py", line 359, in _generate_ip api.v2. resource return NeutronDbPlugin V2._try_ generate_ ip(context, subnets) api.v2. resource File "/usr/lib/ python2. 7/site- packages/ neutron/ db/db_base_ plugin_ v2.py", line 376, in _try_generate_ip api.v2. resource range = range_qry. filter_ by(subnet_ id=subnet[ 'id']). first() api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ orm/query. py", line 2282, in first api.v2. resource ret = list(self[0:1]) api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ orm/query. py", line 2149, in __getitem__ api.v2. resource return list(res) api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ orm/loading. py", line 65, in instances api.v2. resource fetch = cursor.fetchall() api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ engine/ result. py", line 752, in fetchall api.v2. resource self.cursor, self.context) api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 1027, in _handle_ dbapi_exception api.v2. resource util.reraise( *exc_info) api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ engine/ result. py", line 746, in fetchall api.v2. resource l = self.process_ rows(self. _fetchall_ impl()) api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ engine/ result. py", line 715, in _fetchall_impl api.v2. resource self._non_result() api.v2. resource File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ engine/ result. py", line 720, in _non_result api.v2. resource "This result object does not return rows. " api.v2. resource ResourceClosedE rror: This result object does not return rows. It has been closed automatically. api.v2. resource
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.165 26167 TRACE neutron.
2014-10-15 21:59:51.167 26167 INFO neutron.wsgi [-] 172.16.2.86 - - [15/Oct/2014 21:59:51] "POST /v2.0/ports.json HTTP/1.1" 500 296 51.052950