Sort by boot and pass in the marker Exception

Bug #2027532 reported by xuanyandong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Medium
Eric Harney

Bug Description

When accessing the cinder interface and passing in bootable as the sorting condition and marker parameter, the following exception will be reported

GET: http://192.168.182.57:8776/v3/64a95aa320eb409e878659eae19bab00/volumes/detail?sort=bootable:asc&with_count=True&limit=5&marker=d7e93b2f-d6ed-4766-beb5-0e63e7b1c8ee

2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault [req-a8c6ce12-189f-4774-b679-04c2c42603f7 8315c691481f4a6e82d928b5e3d55a39 64a95aa320eb409e878659eae19bab00 - default default] Caught error: <class 'KeyError'> 'boolean': KeyError: 'boolean'
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault Traceback (most recent call last):
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/middleware/fault.py", line 85, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return req.get_response(self.application)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1314, in send
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/osprofiler/web.py", line 112, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return request.get_response(self.application)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1314, in send
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/keystonemiddleware/auth_token/__init__.py", line 341, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault response = req.get_response(self._app)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1314, in send
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/routes/middleware.py", line 141, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault response = self.app(environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/openstack/wsgi.py", line 839, in __call__
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault content_type, body, accept)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/openstack/wsgi.py", line 899, in _process_stack
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault action_result = self.dispatch(meth, request, action_args)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/openstack/wsgi.py", line 994, in dispatch
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return method(req=request, **action_args)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/v2/volumes.py", line 91, in detail
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return self._get_volumes(req, is_detail=True)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/api/v3/volumes.py", line 184, in _get_volumes
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault offset=offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/volume/api.py", line 670, in get_all
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault offset=offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/objects/volume.py", line 655, in get_all_by_project
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault filters=filters, offset=offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/db/api.py", line 312, in volume_get_all_by_project
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault offset=offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/db/sqlalchemy/api.py", line 183, in wrapper
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return f(*args, **kwargs)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/db/sqlalchemy/api.py", line 2347, in volume_get_all_by_project
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault sort_keys, sort_dirs, filters, offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/db/sqlalchemy/api.py", line 2399, in _generate_paginate_query
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault offset=offset)
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/common/sqlalchemyutils.py", line 153, in paginate_query
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault default = _get_default_column_value(model, sort_keys[i])
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault File "/var/lib/kolla/venv/lib/python3.6/site-packages/cinder/common/sqlalchemyutils.py", line 56, in _get_default_column_value
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault return _TYPE_SCHEMA[attr_type.__visit_name__]
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault KeyError: 'boolean'
2023-07-11 09:20:04.754 25 ERROR cinder.api.middleware.fault

Tags: api market
Changed in cinder:
assignee: nobody → xuanyandong (xuanyandong)
tags: added: api
Changed in cinder:
importance: Undecided → Medium
tags: added: market
Changed in cinder:
importance: Medium → Low
status: New → Triaged
Revision history for this message
Eric Harney (eharney) wrote :

I reproduced this on master with

$ cinder list --sort=bootable:asc --limit 5 --marker ca836f1b-3430-4e5f-b0b3-d326b3aa31a5

Eric Harney (eharney)
Changed in cinder:
importance: Low → Medium
Revision history for this message
Eric Harney (eharney) wrote :
Changed in cinder:
assignee: xuanyandong (xuanyandong) → Eric Harney (eharney)
Changed in cinder:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.