cinder volume driver's detach() causes TypeError exception on v1 cinder client
Bug #1561056 reported by
Corey Wright
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Corey Wright | ||
nova (Ubuntu) |
Fix Released
|
Medium
|
Corey Wright |
Bug Description
Nova version: git master branch's HEAD (as of today)
Expected behavior: cinderclient v1 detach() called with accepted argument
Actual behavior: cinderclient v1 detach() called with too many arguments
Change I3cdc4992 indiscriminately passes both volume_id and attachment_id to the Cinder client regardless of its version even though Cinder client v2 supports passing volume_id and optionally attachment_id to its volume manager's detach() method, but v1 does not, only accepting volume_id.
Calling Cinder client v1 detach() with both volume_id and attachment_id results in "TypeError: detach() takes exactly 2 arguments (3 given)"
Full traceback and proposed bug fix to follow.
Changed in nova (Ubuntu): | |
assignee: | nobody → Corey Wright (coreywright) |
Changed in nova (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nova (Ubuntu): | |
status: | Triaged → Fix Released |
To post a comment you must log in.
File "/opt/rackstack /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 379, in decorated_function /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2525, in terminate_instance terminate_ instance( instance, bdms) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ oslo_concurrenc y/lockutils. py", line 271, in inner /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2523, in do_terminate_ instance _set_instance_ obj_error_ state(context, instance) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ oslo_utils/ excutils. py", line 220, in __exit__ force_reraise( ) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ oslo_utils/ excutils. py", line 196, in force_reraise reraise( self.type_ , self.value, self.tb) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2513, in do_terminate_ instance _delete_ instance( context, instance, bdms, quotas) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/hooks. py", line 149, in inner /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2476, in _delete_instance rollback( ) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ oslo_utils/ excutils. py", line 220, in __exit__ force_reraise( ) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ oslo_utils/ excutils. py", line 196, in force_reraise reraise( self.type_ , self.value, self.tb) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2451, in _delete_instance _shutdown_ instance( context, instance, bdms) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/compute/ manager. py", line 2367, in _shutdown_instance volume_ api.detach( context, bdm.volume_id, instance.uuid) /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/volume/ cinder. py", line 249, in wrapper /rackstack. 532.4/nova/ lib/python2. 7/site- packages/ nova/volume/ cinder. py", line 411, in detach t(context) .volumes. detach( volume_ id, attachment_id)
return function(self, context, *args, **kwargs)
File "/opt/rackstack
do_
File "/opt/rackstack
return f(*args, **kwargs)
File "/opt/rackstack
self.
File "/opt/rackstack
self.
File "/opt/rackstack
six.
File "/opt/rackstack
self.
File "/opt/rackstack
rv = f(*args, **kwargs)
File "/opt/rackstack
quotas.
File "/opt/rackstack
self.
File "/opt/rackstack
six.
File "/opt/rackstack
self.
File "/opt/rackstack
self.
File "/opt/rackstack
res = method(self, ctx, volume_id, *args, **kwargs)
File "/opt/rackstack
cinderclien
TypeError: detach() takes exactly 2 arguments (3 given)