Activity log for bug #1827363

Date Who What changed Old value New value Message
2019-05-02 11:21:16 Sebastian Lohff bug added bug
2019-05-02 11:22:33 Sebastian Lohff description When doing a openstack port list that filters for a fixed-ip/subnet and at the same time limits the amount of results neutron returns a 500 internal server error. This was already addressed in https://bugs.launchpad.net/neutron/+bug/1826186 but this bug is also present in other places. While running tempest against a Neutron Queens installation I came across another _get_ports_query() in neutron/plugins/ml2/plugin.py where filter is again called onto the result of an already limited query. See https://github.com/openstack/neutron/blob/6f4962dcf89aebf2552ee8ec0993c6389a953024/neutron/plugins/ml2/plugin.py#L2206 InvalidRequestError: Query.filter() being called on a Query which already has LIMIT or OFFSET applied. To modify the row-limited results of a Query, call from_self() first. Otherwise, call filter() before limit() or offset() are applied. File "pecan/core.py", line 683, in __call__ self.invoke_controller(controller, args, kwargs, state) [...] File "neutron/db/db_base_plugin_v2.py", line 1417, in get_ports page_reverse=page_reverse) File "neutron/plugins/ml2/plugin.py", line 1941, in _get_ports_query query = query.filter(substr_filter) File "<string>", line 2, in filter File "sqlalchemy/orm/base.py", line 200, in generate assertion(self, fn.__name__) File "sqlalchemy/orm/query.py", line 435, in _no_limit_offset % (meth, meth) I applied a patch similar to the one Gabriele Cerami proposed in https://review.opendev.org/#/c/656066/ When doing a grep for _get_ports_query() in the neutron codebase I find a function with this name being called in neutron/db/dvr_mac_db.py in get_ports_on_host_by_subnet(), I do not have a stacktrace or test for that though. See https://github.com/openstack/neutron/blob/6f4962dcf89aebf2552ee8ec0993c6389a953024/neutron/db/dvr_mac_db.py#L162 When doing a openstack port list that filters for a fixed-ip/subnet and at the same time limits the amount of results neutron returns a 500 internal server error. This was already addressed in https://bugs.launchpad.net/neutron/+bug/1826186 but this bug is also present in other places. While running tempest against a Neutron Queens installation I came across another _get_ports_query() in neutron/plugins/ml2/plugin.py where filter is again called onto the result of an already limited query. See https://github.com/openstack/neutron/blob/6f4962dcf89aebf2552ee8ec0993c6389a953024/neutron/plugins/ml2/plugin.py#L2206 InvalidRequestError: Query.filter() being called on a Query which already has LIMIT or OFFSET applied. To modify the row-limited results of a Query, call from_self() first. Otherwise, call filter() before limit() or offset() are applied.   File "pecan/core.py", line 683, in __call__     self.invoke_controller(controller, args, kwargs, state) [...]   File "neutron/db/db_base_plugin_v2.py", line 1417, in get_ports     page_reverse=page_reverse)   File "neutron/plugins/ml2/plugin.py", line 1941, in _get_ports_query     query = query.filter(substr_filter)   File "<string>", line 2, in filter   File "sqlalchemy/orm/base.py", line 200, in generate     assertion(self, fn.__name__)   File "sqlalchemy/orm/query.py", line 435, in _no_limit_offset     % (meth, meth) I applied a patch similar to the one Gabriele Cerami proposed in https://review.opendev.org/#/c/656066/ on our production setup and this seems to have fixed the bug there as well. When doing a grep for _get_ports_query() in the neutron codebase I find a function with this name being called in neutron/db/dvr_mac_db.py in get_ports_on_host_by_subnet(), I do not have a stacktrace or test for that though. See https://github.com/openstack/neutron/blob/6f4962dcf89aebf2552ee8ec0993c6389a953024/neutron/db/dvr_mac_db.py#L162
2019-05-02 14:22:53 Brian Haley bug added subscriber Brian Haley
2019-05-02 14:22:57 Brian Haley neutron: status New Confirmed
2019-05-02 14:23:01 Brian Haley neutron: importance Undecided Medium
2019-05-07 03:11:47 Nate Johnston neutron: importance Medium High
2019-05-07 09:37:37 Gabriele Cerami neutron: assignee Gabriele Cerami (gcerami)
2019-05-13 09:42:35 OpenStack Infra neutron: status Confirmed In Progress
2019-05-13 09:46:27 Rodolfo Alonso tags neutron-proactive-backport-potential
2019-05-21 07:45:46 OpenStack Infra neutron: status In Progress Fix Released
2019-09-10 12:23:45 OpenStack Infra tags neutron-proactive-backport-potential in-stable-rocky neutron-proactive-backport-potential
2019-09-11 04:49:06 OpenStack Infra tags in-stable-rocky neutron-proactive-backport-potential in-stable-rocky in-stable-stein neutron-proactive-backport-potential