← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1580319] [NEW] unreleased cinderclient fails volume-attach due to new Client parameter

 

Public bug reported:

Description
===========
Using the current version of python-cinderclient on master with Nova, an attempt to attach a volume will fail. It appears that the new parameter "api_version" in the cinderclient is the cause.

Steps to reproduce
==================
1. Deploy Devstack
2. clone the python-cinderclient repo to get the latest version on master
   /opt/stack$ git clone git://git.openstack.org/openstack/python-cinderclient.git
3. remove the existing cinderclient from /usr/local/lib/python2.7/dist-packages
   sudo rm -rf /usr/local/lib/python2.7/dist-packages/cinderclient
4. link the latest version:
   sudo cp -rs /opt/stack/python-cinderclient/cinderclient /urr/local/lib/python2.7/dist-packages/
5. Create a volume
   cinder create 1
6. Boot a Nova instance
   nova boot --image <image_id> --flavor 1 VM0
7. Attempt to attach the volume
   nova volume-attach <instance_id> <volume_id> /dev/vdc

Expected result
===============
Volume attach succeeds

Actual result
=============
scott@DevMay9:~/devstack$ nova volume-attach c6ecc894-2e1a-42c5-ba9c-51d1c0c5b1da f87a00d5-22e3-4a36-8b8a-8cc0b3121b61 /dev/vdc
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.TypeError'> (HTTP 500) (Request-ID: req-902e1982-5aac-45cc-b129-8e2df12744aa)

n-api logs:
2016-05-10 13:36:04.799 ERROR nova.api.openstack.extensions [req-902e1982-5aac-45cc-b129-8e2df12744aa demo demo] Unexpected exception in API method
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/volumes.py", line 316, in create
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume_id, device)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 169, in wrapped
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return func(self, context, target, *args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 158, in inner
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return function(self, context, instance, *args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 139, in inner
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return f(self, context, instance, *args, **kw)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3173, in attach_volume
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     disk_bus, device_type)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3115, in _attach_volume
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume_bdm.destroy()
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 221, in __exit__
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     self.force_reraise()
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 197, in force_reraise
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3111, in _attach_volume
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     self._check_attach_and_reserve_volume(context, volume_id, instance)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3096, in _check_attach_and_reserve_volume
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume = self.volume_api.get(context, volume_id)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 187, in wrapper
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     res = method(self, ctx, *args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 210, in wrapper
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     res = method(self, ctx, volume_id, *args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 256, in get
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     item = cinderclient(context).volumes.get(volume_id)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 102, in cinderclient
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     **service_parameters)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 634, in Client
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions 
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/v2/client.py", line 119, in __init__
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 551, in _construct_http_client
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     bypass_url=None, retries=None,
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return wrapped(*args, **kwargs)
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions TypeError: __init__() got an unexpected keyword argument 'api_version'
2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions 


Environment
===========
scott@DevMay9:/opt/stack/nova$ git log -1
commit 421c52d9d341b07d850c21e0e702a008a8e1d3b7
Merge: cb0740a 8f4e803
Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
Date:   Tue May 10 15:37:46 2016 +0000

    Merge "api-ref: complete verification for diagnostics.inc"

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: volumes

** Tags added: volumes

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1580319

Title:
  unreleased cinderclient fails volume-attach due to new Client
  parameter

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  Using the current version of python-cinderclient on master with Nova, an attempt to attach a volume will fail. It appears that the new parameter "api_version" in the cinderclient is the cause.

  Steps to reproduce
  ==================
  1. Deploy Devstack
  2. clone the python-cinderclient repo to get the latest version on master
     /opt/stack$ git clone git://git.openstack.org/openstack/python-cinderclient.git
  3. remove the existing cinderclient from /usr/local/lib/python2.7/dist-packages
     sudo rm -rf /usr/local/lib/python2.7/dist-packages/cinderclient
  4. link the latest version:
     sudo cp -rs /opt/stack/python-cinderclient/cinderclient /urr/local/lib/python2.7/dist-packages/
  5. Create a volume
     cinder create 1
  6. Boot a Nova instance
     nova boot --image <image_id> --flavor 1 VM0
  7. Attempt to attach the volume
     nova volume-attach <instance_id> <volume_id> /dev/vdc

  Expected result
  ===============
  Volume attach succeeds

  Actual result
  =============
  scott@DevMay9:~/devstack$ nova volume-attach c6ecc894-2e1a-42c5-ba9c-51d1c0c5b1da f87a00d5-22e3-4a36-8b8a-8cc0b3121b61 /dev/vdc
  ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.TypeError'> (HTTP 500) (Request-ID: req-902e1982-5aac-45cc-b129-8e2df12744aa)

  n-api logs:
  2016-05-10 13:36:04.799 ERROR nova.api.openstack.extensions [req-902e1982-5aac-45cc-b129-8e2df12744aa demo demo] Unexpected exception in API method
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions Traceback (most recent call last):
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/volumes.py", line 316, in create
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume_id, device)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 169, in wrapped
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return func(self, context, target, *args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 158, in inner
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return function(self, context, instance, *args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 139, in inner
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return f(self, context, instance, *args, **kw)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3173, in attach_volume
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     disk_bus, device_type)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3115, in _attach_volume
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume_bdm.destroy()
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 221, in __exit__
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     self.force_reraise()
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 197, in force_reraise
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3111, in _attach_volume
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     self._check_attach_and_reserve_volume(context, volume_id, instance)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 3096, in _check_attach_and_reserve_volume
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     volume = self.volume_api.get(context, volume_id)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 187, in wrapper
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     res = method(self, ctx, *args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 210, in wrapper
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     res = method(self, ctx, volume_id, *args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 256, in get
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     item = cinderclient(context).volumes.get(volume_id)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/volume/cinder.py", line 102, in cinderclient
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     **service_parameters)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 634, in Client
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions 
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/v2/client.py", line 119, in __init__
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 551, in _construct_http_client
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     bypass_url=None, retries=None,
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions     return wrapped(*args, **kwargs)
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions TypeError: __init__() got an unexpected keyword argument 'api_version'
  2016-05-10 13:36:04.799 TRACE nova.api.openstack.extensions 

  
  Environment
  ===========
  scott@DevMay9:/opt/stack/nova$ git log -1
  commit 421c52d9d341b07d850c21e0e702a008a8e1d3b7
  Merge: cb0740a 8f4e803
  Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
  Date:   Tue May 10 15:37:46 2016 +0000

      Merge "api-ref: complete verification for diagnostics.inc"

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1580319/+subscriptions


Follow ups