Project

General

Profile

Bug #47426

Fix traceback on auth.token call

Added by William Grzybowski about 2 years ago. Updated almost 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

[2018/09/17 05:29:32] (WARNING) application.call_method():182 - Exception while calling auth.token(*['bcf31f5f-ab74-482f-8769-b0002c00f885'])
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 155, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1033, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 987, in _call
    return await run_method(methodobj, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 925, in _run_in_conn_threadpool
    return await self.run_in_executor(self.__threadpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 913, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/auth.py", line 171, in token
    self.authtokens.pop_token(token['id'])
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/auth.py", line 61, in pop_token
    token = self.__tokens.pop(token_id)
KeyError: 'bcf31f5f-ab74-482f-8769-b0002c00f885'

https://sentry.ixsystems.com/ixsystems/freenas-middleware/issues/15459/

Associated revisions

Revision ffb2ad26 (diff)
Added by William Grzybowski about 2 years ago

fix(middlewared/auth): make sure auth token exists before remove it Ticket: #47426

Revision 569aab50 (diff)
Added by William Grzybowski about 2 years ago

fix(middlewared/auth): make sure auth token exists before remove it Ticket: #47426

History

#1 Updated by William Grzybowski about 2 years ago

  • Description updated (diff)

#2 Updated by Dru Lavigne about 2 years ago

  • Status changed from Unscreened to In Progress

#3 Updated by Bug Clerk about 2 years ago

  • Status changed from In Progress to Ready for Testing

#4 Updated by Dru Lavigne almost 2 years ago

  • Subject changed from Traceback on auth.token call to Fix traceback on auth.token call
  • Needs QA changed from No to Yes
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#5 Updated by William Grzybowski almost 2 years ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF