Ask Your Question
0

nova attach-volume - AttributeError: display_name

asked 2014-02-03 07:56:54 -0500

Mathias Ewald gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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 Ewald gravatar imageMathias Ewald ( 2014-02-03 11:26:05 -0500 )edit

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.

dtaylor gravatar imagedtaylor ( 2014-02-04 03:47:36 -0500 )edit

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 Mokoetle gravatar imageNapo Mokoetle ( 2014-02-05 03:42:10 -0500 )edit

@Napo: I assume he just leaves the v1 endpoint in place. This worked for me, too!

Mathias Ewald gravatar imageMathias Ewald ( 2014-02-05 09:36:54 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-02-04 03:51:18 -0500

dtaylor gravatar image

Sorry, should have put this in the answer section (please excuse my copy and paste). 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.

Give this a try, and let me know if you have any other issues. Should work for now until full support for v2 is added. An email snippet from an exchange with Dafna (poster of the bug): "Yes, to fix the issue we need to delete the v2 endpoints because the v1 will not automatically work"

edit flag offensive delete link more
0

answered 2014-02-05 03:40:35 -0500

Napo Mokoetle gravatar image

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:

TRACE 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?

edit flag offensive delete link more

Comments

Napo, as far as I remember I did not make any changes besides removing the endpoint. I am currently running OpenStack in a development environment using only the Cinder V1 endpoint, and I can create Nova instances and attach volumes with no problems.

dtaylor gravatar imagedtaylor ( 2014-02-05 04:00:50 -0500 )edit

Thanks dtaylor, your advice worked. The Volume link in the dashboard no longer throws an error when I click on it because I know only have v1 endpoint for the cinder service. But now my problem is the volume-attach command I had executed when I started experiencing the problem is in in "attaching" state and doesn't even change state when I bounce of openstack processes. When I try deleting the volume I was trying to attach it tells me I have no permissions to do so since the volume is on in "available" state. Any idea what I can do to reset this operation successfully?

Napo Mokoetle gravatar imageNapo Mokoetle ( 2014-02-07 10:30:17 -0500 )edit

You can reset the state of any cinder volume by running: 'cinder reset-state [volume ID]'. Once this command is completed, you should be able to remove the volume with either 'cinder delete' or 'cinder force-delete'.

dtaylor gravatar imagedtaylor ( 2014-02-10 20:30:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-02-03 07:56:54 -0500

Seen: 895 times

Last updated: Feb 05 '14