Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError on sorting disks #2244

Open
JeffreyDevloo opened this issue Jan 17, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@JeffreyDevloo
Copy link
Contributor

commented Jan 17, 2019

API request:

Jan 17 14:34:39 DEV-4N-199-191 ovs-webapp-api[2754]: 2019-01-17 14:34:39 14100 +0100 - DEV-4N-199-191 - 2793/139821510998448 - api/decorators.py - new_function - 5128 - INFO - [disks.list] - 8ec11624-0203-498d-9a4b-908aa6e25db6 - [] - {} - {"cookies": {"csrftoken": "SSADQf1kgRLQKdOwvCI7wynJEecXxMor"}, "meta": {"HTTP_AUTHORIZATION": "Bearer +6=mCx/|imZ<=u*_48g<*omCXC>i;lKASMoib:79Sw,+3{t>tdvz1M:>nbsD!iE,", "wsgi.multiprocess": "True", "HTTP_COOKIE": "csrftoken=SSADQf1kgRLQKdOwvCI7wynJEecXxMor", "HTTP_X_FORWARDED_SSL": "on", "SERVER_SOFTWARE": "gunicorn/19.4.5", "SCRIPT_NAME": "/api", "REQUEST_METHOD": "GET", "PATH_INFO": "/disks/", "SERVER_PROTOCOL": "HTTP/1.0", "QUERY_STRING": "storagerouterguid=642b05ac-2088-40cc-80d0-e9d663d6a88a&contents=_relations&sort=name&timestamp=1547732079097", "HTTP_X_REAL_IP": "192.168.11.171", "HTTP_USER_AGENT": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36", "HTTP_CONNECTION": "close", "HTTP_REFERER": "https://10.100.199.191/", "SERVER_NAME": "127.0.0.1", "REMOTE_PORT": "38452", "wsgi.url_scheme": "https", "SERVER_PORT": "8002", "HTTP_X_SCHEME": "https", "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", "wsgi.input": "<gunicorn.http.body.Body object at 0x7f2abbab2810>", "HTTP_HOST": "10.100.199.191", "wsgi.multithread": "True", "HTTP_ACCEPT": "application/json; version=*", "wsgi.version": "(1, 0)", "RAW_URI": "/disks/?storagerouterguid=642b05ac-2088-40cc-80d0-e9d663d6a88a&contents=_relations&sort=name&timestamp=1547732079097", "wsgi.run_once": "False", "wsgi.errors": "<gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f2abbab2a10>", "REMOTE_ADDR": "127.0.0.1", "HTTP_ACCEPT_LANGUAGE": "nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7", "gunicorn.socket": "<socket fileno=16 sock=127.0.0.1:8002 peer=127.0.0.1:38452>", "CONTENT_TYPE": "application/json", "wsgi.file_wrapper": "<class 'gunicorn.http.wsgi.FileWrapper'>", "CSRF_COOKIE": "SSADQf1kgRLQKdOwvCI7wynJEecXxMor", "HTTP_ACCEPT_ENCODING": "gzip, deflate, br"}, "request": {"sort": "name", "timestamp": "1547732079097", "storagerouterguid": "642b05ac
Jan 17 14:34:39 DEV-4N-199-191 ovs-webapp-api[2754]: -2088-40cc-80d0-e9d663d6a88a", "contents": "_relations"}}
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]: 2019-01-17 14:32:54 25100 +0100 - DEV-4N-199-191 - 2790/139821514918480 - api/middleware.py - process_exception - 4765 - ERROR - An unhandled exception occurr
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]: Traceback (most recent call last):
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/usr/lib/python2.7/dist-packages/rest_framework/viewsets.py", line 78, in view
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     return self.dispatch(request, *args, **kwargs)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     return view_func(*args, **kwargs)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/usr/lib/python2.7/dist-packages/rest_framework/views.py", line 399, in dispatch
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     response = self.handle_exception(exc)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/usr/lib/python2.7/dist-packages/rest_framework/views.py", line 396, in dispatch
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     response = handler(request, *args, **kwargs)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 655, in new_function
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     return_value = f(*args, **kwargs)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 89, in new_function
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     result = f(*args, **kw)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 364, in new_function
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     data_list.sort(key=lambda e: DalToolbox.extract_key(e, field), reverse=desc)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/opt/OpenvStorage/ovs/dal/datalist.py", line 813, in sort
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     self._guids.sort(key=_extract_key, reverse=reverse)
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:   File "/opt/OpenvStorage/ovs/dal/datalist.py", line 806, in _extract_key
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]:     type_dict.update(self._data[guid]['data'])
Jan 17 14:32:54 DEV-4N-199-191 ovs-webapp-api[2754]: KeyError: '0575ecd5-e029-4352-9d36-8fb2b05b38cd'

Most likely introduced by #2221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.