Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nova attach-volume - AttributeError: display_name

Hi, I am playing with Cinder now. I can create a volume using "cinder create" and can see the logical volume being created (I followed the ubuntu installation guide, so I am using LVM and iSCSI). Attaching the volume I am getting a big fat error message. But first things first:

controller: /etc/cinder/cinder.conf

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver
volume_name_template = volume-%s
volume_group = cinder-volumes
volume_backend_name = LVM_iSCSI
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = cinder.openstack.common.rpc.impl_kombu
rabbit_host=controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_use_ssl = false
sql_connection=mysql://cinder:cinder@localhost/cinder

block1: /etc/cinder/cinder.conf

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver
volume_name_template = volume-%s
volume_group = cinder-volumes
volume_backend_name = LVM_iSCSI
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = cinder.openstack.common.rpc.impl_kombu
rabbit_host=controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_use_ssl = false

block1: LVM

root@block1:~# pvscan
  PV /dev/sdb   VG cinder-volumes   lvm2 [100.00 GiB / 99.00 GiB free]
  Total: 1 [100.00 GiB] / in use: 1 [100.00 GiB] / in no VG: 0 [0   ]
root@block1:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "cinder-volumes" using metadata type lvm2
root@block1:~# lvscan
  ACTIVE            '/dev/cinder-volumes/volume-bb3afafa-00c6-40f8-aec4-1a19be18b946' [1.00 GiB] inherit
root@block1:~#

controller: cinder

root@controller:~# cinder list                                                                                                                            
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|                  ID                  |   Status  |       Name      | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
| bb3afafa-00c6-40f8-aec4-1a19be18b946 | available | testvol_backend |  1   |     lvm     |  false   |             |
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
root@controller:~# nova volume-list                                                                                                                       
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| bb3afafa-00c6-40f8-aec4-1a19be18b946 | available |              | 1    | lvm         |             |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
root@controller:~#

This is how I try to attach my volume:

root@controller:~# nova volume-attach d4962fbc-9d3d-4995-9fce-2e6c3b25db9c bb3afafa-00c6-40f8-aec4-1a19be18b946 /dev/sdb                                  
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-286c4c5d-5932-45a5-a895-445d22134049
)                                                                                                                                                         
root@controller:~#

controller: /var/log/cinder/cinder-api.log

2014-02-03 15:49:28.926 962 INFO cinder.api.openstack.wsgi [req-6071d8a8-f774-45ba-b572-06fd0ad1081f a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4fde9562
02e3070fe688] GET http://controller:8776/v2/2575481bef7f4fde956202e3070fe688/volumes/bb3afafa-00c6-40f8-aec4-1a19be18b946
2014-02-03 15:49:29.104 962 INFO cinder.api.openstack.wsgi [req-6071d8a8-f774-45ba-b572-06fd0ad1081f a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4fde9562
02e3070fe688] http://controller:8776/v2/2575481bef7f4fde956202e3070fe688/volumes/bb3afafa-00c6-40f8-aec4-1a19be18b946 returned with HTTP 200

controller: /var/log/nova/nova-api.log

2014-02-03 15:49:28.548 2878 INFO nova.osapi_compute.wsgi.server [-] (2878) accepted ('192.168.0.10', 34287)

2014-02-03 15:49:28.702 2878 INFO nova.osapi_compute.wsgi.server [req-34cbac2b-1044-4ba5-9b97-aeac5438c4c8 a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4f
de956202e3070fe688] 192.168.0.10 "GET /v2/2575481bef7f4fde956202e3070fe688/servers/d4962fbc-9d3d-4995-9fce-2e6c3b25db9c HTTP/1.1" status: 200 len: 1856 ti
me: 0.1518810

2014-02-03 15:49:28.710 2878 AUDIT nova.api.openstack.compute.contrib.volumes [req-5e721e83-23ef-4f1f-89b8-c8cba257ac9f a8b5af7cb2ab401f90d5b4903c091216 2
575481bef7f4fde956202e3070fe688] Attach volume bb3afafa-00c6-40f8-aec4-1a19be18b946 to instance d4962fbc-9d3d-4995-9fce-2e6c3b25db9c at /dev/sdb
2014-02-03 15:49:28.835 2878 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2014-02-03 15:49:29.123 2878 ERROR nova.api.openstack [req-5e721e83-23ef-4f1f-89b8-c8cba257ac9f a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4fde956202e30
70fe688] Caught error: display_name
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack Traceback (most recent call last):
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 119, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return req.get_response(self.application)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     application, catch_exc_info=False)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return resp(environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 539, in __ca
ll__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return self.app(env, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return resp(environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return resp(environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     response = self.app(environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return resp(environ, start_response)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 917, in __call__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     content_type, body, accept)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 976, in _process_stack
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 1057, in dispatch
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return method(req=request, **action_args)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/volumes.py", line 410, i
n create
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     volume_id, device)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 198, in wrapped
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return func(self, context, target, *args, **kwargs)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 188, in inner
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return function(self, context, instance, *args, **kwargs)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 169, in inner
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return f(self, context, instance, *args, **kw)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2645, in attach_volume
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     context, instance['uuid'], device)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2637, in attach_volume
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     volume = self.volume_api.get(context, volume_id)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 176, in wrapper
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     res = method(self, ctx, volume_id, *args, **kwargs)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 210, in get
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     return _untranslate_volume_summary_view(context, item)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 136, in _untranslate_volume_su
mmary_view
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     d['display_name'] = vol.display_name
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/cinderclient/base.py", line 268, in __getattr__
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack     raise AttributeError(k)
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack AttributeError: display_name
2014-02-03 15:49:29.123 2878 TRACE nova.api.openstack
2014-02-03 15:49:29.128 2878 INFO nova.api.openstack [req-5e721e83-23ef-4f1f-89b8-c8cba257ac9f a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4fde956202e307
0fe688] http://controller:8774/v2/2575481bef7f4fde956202e3070fe688/servers/d4962fbc-9d3d-4995-9fce-2e6c3b25db9c/os-volume_attachments returned with HTTP 5
00
2014-02-03 15:49:29.135 2878 INFO nova.osapi_compute.wsgi.server [req-5e721e83-23ef-4f1f-89b8-c8cba257ac9f a8b5af7cb2ab401f90d5b4903c091216 2575481bef7f4f
de956202e3070fe688] 192.168.0.10 "POST /v2/2575481bef7f4fde956202e3070fe688/servers/d4962fbc-9d3d-4995-9fce-2e6c3b25db9c/os-volume_attachments HTTP/1.1" s
tatus: 500 len: 335 time: 0.4317470

On the compute node, nothing shows in the log files. Further I noticed there is no way to configure volumes in Horizon, so there has to be something wrong, too. Might be related or not.

cheers Mathias