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 ...
Ok, was searching the web in a nova context but then could see it in horizon, too, and found it was this bug: https://bugs.launchpad.net/horizon/+bug/1255977 But since the bug is pretty old I was wondering if there is still no solution!?
Mathias, I found the same bug. The way I resolved the issue was by completely removing the v2 endpoint for the Cinder volume service. You can do this with the 'keystone endpoint-delete [v2 endpoint ID]' command. It looks like a fix is in the works but hasn't been implemented yet.
Hi dtaylor, I'm also experiencing this problem with nova-attach and when I look in the nova-api.log on the controller is see an error like this: T**RACE nova.api.openstack AttributeError: display_name "TRACE nova.api.openstack AttributeError: display_name"** After you removed the V2 endpoint for Cinder, what did you replace the V2 endpoint for Cinder with to make volume-attach work?
@Napo: I assume he just leaves the v1 endpoint in place. This worked for me, too!