port list / get_ports() fails when filtering and limiting at the same time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Gabriele Cerami |
Bug 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.
Example command: openstack port list --fixed-ip ip-address=
Limits should be applied automatically with a recent version of the openstacksdk with pagination turned on by default. Additionally, I attached a testcase that triggers this bug. This bug was found on neutron-queens, but the test-case also breaks current master (tested on commit id 1214e59cc2d818f
It looks like _get_ports_query() gets a query with pre-applied limits by calling model_query.
The corresponding exception neutron exception would be the following:
InvalidRequestE
File "pecan/core.py", line 683, in __call__
self.
File "pecan/core.py", line 574, in invoke_controller
result = controller(*args, **kwargs)
File "neutron/
setattr(e, '_RETRY_EXCEEDED', True)
File "oslo_utils/
self.
File "oslo_utils/
six.
File "neutron/
return f(*args, **kwargs)
File "oslo_db/api.py", line 147, in wrapper
ectxt.value = e.inner_exc
File "oslo_utils/
self.
File "oslo_utils/
six.
File "oslo_db/api.py", line 135, in wrapper
return f(*args, **kwargs)
File "neutron/
LOG.
File "oslo_utils/
self.
File "oslo_utils/
six.
File "neutron/
return f(*dup_args, **dup_kwargs)
File "neutron/
return f(*args, **kwargs)
File "neutron/
return self.get(*args, **kwargs)
File "neutron/
**query_
File "neutron/
return method(*args, **kwargs)
File "neutron/
setattr(e, '_RETRY_EXCEEDED', True)
File "oslo_utils/
self.
File "oslo_utils/
six.
File "neutron/
return f(*args, **kwargs)
File "oslo_db/api.py", line 147, in wrapper
ectxt.value = e.inner_exc
File "oslo_utils/
self.
File "oslo_utils/
six.
File "oslo_db/api.py", line 135, in wrapper
return f(*args, **kwargs)
File "neutron/
LOG.
File "oslo_utils/
self.
File "oslo_utils/
six.
File "neutron/
return f(*dup_args, **dup_kwargs)
File "neutron/
page_
File "neutron/
query = query.filter(
File "<string>", line 2, in filter
File "sqlalchemy/
assertion(self, fn.__name__)
File "sqlalchemy/
% (meth, meth)
Changed in neutron: | |
status: | New → Confirmed |
Newbie here. Expect slow resolution. If you think this bug is too urgent to be assigned to me, please tell me.