Fix 'DBDeadlock' object has no attribute 'message'

Bug #1891571 reported by wangyu on 2020-08-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Karbor
Undecided
Unassigned

Bug Description

When attempting to run karbor fullstack job, I get the following error in the devstack@karbor-api log:
Aug 12 06:16:02.072242 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/paste/urlmap.py", line 216, in __call__
Aug 12 06:16:02.072242 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor return app(environ, start_response)
Aug 12 06:16:02.072242 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/dec.py", line 129, in __call__
Aug 12 06:16:02.072242 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor resp = self.call_func(req, *args, **kw)
Aug 12 06:16:02.072242 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/dec.py", line 193, in call_func
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor return self.func(req, *args, **kwargs)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/oslo_middleware/request_id.py", line 58, in __call__
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor response = req.get_response(self.application)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/request.py", line 1314, in send
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor application, catch_exc_info=False)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/request.py", line 1278, in call_application
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor app_iter = application(self.environ, start_response)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/dec.py", line 129, in __call__
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor resp = self.call_func(req, *args, **kw)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/usr/local/lib/python3.6/dist-packages/webob/dec.py", line 193, in call_func
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor return self.func(req, *args, **kwargs)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/opt/stack/karbor/karbor/api/middleware/fault.py", line 66, in __call__
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor return self._error(ex, req)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor File "/opt/stack/karbor/karbor/api/middleware/fault.py", line 42, in _error
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor LOG.error('Middleware error occurred: %s', inner.message)
Aug 12 06:16:02.092350 ubuntu-bionic-airship-kna1-0019222996 <email address hidden>[31214]: 2020-08-12 06:15:59.518 TRACE karbor AttributeError: 'DBDeadlock' object has no attribute 'message'

wangyu (wangzhongyu) on 2020-08-14
summary: - Fix'DBDeadlock' object has no attribute 'message'
+ Fix 'DBDeadlock' object has no attribute 'message'

Reviewed: https://review.opendev.org/746259
Committed: https://git.openstack.org/cgit/openstack/karbor/commit/?id=e167485dd7efeaae428fcb4b7b08269318dd330b
Submitter: Zuul
Branch: master

commit e167485dd7efeaae428fcb4b7b08269318dd330b
Author: wangyu <email address hidden>
Date: Fri Aug 14 10:17:28 2020 +0800

    Fix inner has no attribute 'message'

    When DBDeadlock in karbor-api service, it get the following error:
    AttributeError: 'DBDeadlock' object has no attribute 'message'.

    This patch corrects that problem.

    Change-Id: I1b268f5cca2c4efdcfb055d2fd8dfe522e6daf9d
    Closes-Bug: #1891571

Changed in karbor:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers