initialize_connection failure can result in 'exceptions.TypeError' object has no attribute 'code'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Wenzhi Yu | ||
Liberty |
Fix Released
|
Medium
|
Wenzhi Yu | ||
Mitaka |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
Doing an initialize_
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
2016-03-29 06:51:06.882 25713 ERROR nova.compute.
Here is the method:
@translate_
def initialize_
try:
return connection_info
except cinder_
with excutils.
@translate_
def terminate_
return cinderclient(
Presumably the issue has to do with the @translate_
Changed in nova: | |
assignee: | nobody → Diana Clarke (diana-clarke) |
Changed in nova: | |
assignee: | Diana Clarke (diana-clarke) → Wenzhi Yu (yuywz) |
status: | Triaged → In Progress |
What version of nova is this? Mitaka? It probably doesn't really matter, the issue is here as you pointed out:
except Exception as exc:
LOG. error(_ LE('Connection between volume %(vol)s and host '
' %(host) s might have succeeded, but attempt '
' to terminate connection has failed. '
' Validate the connection and determine if '
' manual cleanup is needed. Error: %(msg)s '
' Code: %(code)s.'),
{'vol' : volume_id,
'host' : connector. get('host' ),
'msg' : six.text_type(exc),
'code' : exc.code}) <---------- blows up
exc in this case is a TypeError, which doesn't have a code on it. That code is probably expecting a CinderClientExc eption or NovaException, but something else breaks and we get a TypeError instead.