Cinder does not fill in Display Name on creation

Bug #1117384 reported by Jacob Godin on 2013-02-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Mike Perez
OpenStack Dashboard (Horizon)
Undecided
Unassigned
openstack-ubuntu-testing
Undecided
Unassigned

Bug Description

When creating a block storage device, Cinder should fill in the volume's display name prior to trying to create the volume. Currently:

cinder create --display-name Test 1
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | 3a5d96b3-d134-485a-bc09-30a9d869d9e6 |
| links | [{u'href': u'http://10.150.0.55:8776/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/3a5d96b3-d134-485a-bc09-30a9d869d9e6', u'rel': u'self'}, {u'href': u'http://10.150.0.55:8776/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/3a5d96b3-d134-485a-bc09-30a9d869d9e6', u'rel': u'bookmark'}] |
| name | Test |
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

cinder list
+--------------------------------------+----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+--------------+------+-------------+----------+-------------+
| 3a5d96b3-d134-485a-bc09-30a9d869d9e6 | creating | | 1 | None | | |
+--------------------------------------+----------+--------------+------+-------------+----------+-------------+

This causes Horizon to throw an error when browsing to the Volumes page. I'm sure this is a bug on both sides (aka Horizon shouldn't require a name to display a volume). I noticed this when I was having issues with my Cinder storage service, so the Cinder scheduler couldn't create a volume:
2013-02-06 10:35:25 WARNING cinder.scheduler.manager [req-eb7d7f46-c5ce-490c-b8ff-aab64a2ede02 15f9ce750c9f4c20b86c9e3e095c27ce 951f2ba7f0c44ae6a38ea7a9db3897b2] Failed to schedule_create_volume: No valid host was found. Is the appropriate service running?

Julie Pichon (jpichon) wrote :

I'm having trouble reproducing in Horizon - the interface normally displays the id when there is no name. Which version is this? What's the error in the logs?

I'm also seeing the name when creating, which might be part of the reason I can't reproduce. (Disabling the cinder API gets me a connection refused error, so I'm uncertain as to how to reproduce that particular error condition).

$ cinder list
 | 53c281af-4380-4aa7-8aa1-01ecd22b51f0 | creating | Test | 1 | None | false | |

Changed in horizon:
status: New → Incomplete
Jacob Godin (jacobgodin) wrote :
Download full text (8.5 KiB)

Hi Julie,

I'm currently running the most recent trunk versions of Horizon and Cinder.

Here is exactly what I'm doing:
# cinder create --display-name test --display-description test123 1
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | 43873abc-46e2-44dd-ae68-78605108cd9c |
| links | [{u'href': u'http://10.150.0.55:8776/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/43873abc-46e2-44dd-ae68-78605108cd9c', u'rel': u'self'}, {u'href': u'http://10.150.0.55:8776/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/43873abc-46e2-44dd-ae68-78605108cd9c', u'rel': u'bookmark'}] |
| name | test |
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 43873abc-46e2-44dd-ae68-78605108cd9c | available | | 1 | None | | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

cinder-api.log from create:
2013-02-06 11:59:24 INFO cinder.api.openstack.wsgi [req-3257599a-1d7b-4dd1-b6ed-1698e2c65c24 15f9ce750c9f4c20b86c9e3e095c27ce 951f2ba7f0c44ae6a38ea7a9db3897b2] POST http://10.150.0.55:8776/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes
2013-02-06 11:59:24 AUDIT cinder.api.v2.volumes [req-3257599a-1d7b-4dd1-b6ed-1698e2c65c24 15f9ce750c9f4c20b86c9e3e095c27ce 951f2...

Read more...

Julie Pichon (jpichon) wrote :

Thank you for all the extra information Jacob. I will let the cinder folks get back to you for the cinder side of the issue, which I'm not as familiar with. Could you provide additional information on what error message is displayed in Horizon when this happens, and any related exceptions from the Apache logs? Thank you.

Jacob Godin (jacobgodin) wrote :
Download full text (3.7 KiB)

Hi Julie,

I'm not seeing much as far as Horizon goes. Looks like mostly nova stuff:

[Wed Feb 06 18:39:03 2013] [error] REQ: curl -i http://10.150.0.52:8774/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/detail?project_id=951f2ba7f0c44ae6a38ea7a9db3897b2 -X GET -H "X-Auth-Project-Id: 951f2ba7f0c44ae6a38ea7a9db3897b2" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 396e62e065cb4631a3cf03f3696855f9"

...Repeats a dozon or so times....

[Wed Feb 06 18:39:03 2013] [error]
[Wed Feb 06 18:39:03 2013] [error] 2013-02-06T18:39:03.660275 GET http://10.150.0.52:8774/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/detail?project_id=951f2ba7f0c44ae6a38ea7a9db3897b2
[Wed Feb 06 18:39:03 2013] [error] RESP: [200] {'date': 'Wed, 06 Feb 2013 18:39:03 GMT', 'x-compute-request-id': 'req-24d6e473-e005-41be-a0ae-75f40b544e29', 'content-type': 'application/json', 'content-length': '2690'}
[Wed Feb 06 18:39:03 2013] [error] RESP BODY: {"servers": [{"status": "ACTIVE", "updated": "2013-02-05T20:10:16Z", "hostId": "5f0cc9a1c6bce02653a923caf7d4f3d42c9a4a968e1c51b0367c0ba9", "addresses": {"Test Net": [{"version": 4, "addr": "10.0.0.4"}]}, "links": [{"href": "http://10.150.0.52:8774/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/3484738c-ea09-45ed-9d87-db1d75f8533d", "rel": "self"}, {"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/3484738c-ea09-45ed-9d87-db1d75f8533d", "rel": "bookmark"}], "key_name": null, "image": {"id": "786654b5-dab6-4448-80ee-a15e810a31a2", "links": [{"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/images/786654b5-dab6-4448-80ee-a15e810a31a2", "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "flavor": {"id": "54ae82b7-c0c0-45cb-a39c-b55cc7ed8f28", "links": [{"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/flavors/54ae82b7-c0c0-45cb-a39c-b55cc7ed8f28", "rel": "bookmark"}]}, "id": "3484738c-ea09-45ed-9d87-db1d75f8533d", "security_groups": [{"name": "default"}], "user_id": "72cac1a7fcd84d1b9bf0f4147aaff2b2", "name": "Test2", "created": "2013-02-05T20:10:10Z", "tenant_id": "951f2ba7f0c44ae6a38ea7a9db3897b2", "OS-DCF:diskConfig": "MANUAL", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}, {"status": "ACTIVE", "updated": "2013-02-05T01:58:09Z", "hostId": "5f0cc9a1c6bce02653a923caf7d4f3d42c9a4a968e1c51b0367c0ba9", "addresses": {"Test Net": [{"version": 4, "addr": "10.0.0.3"}]}, "links": [{"href": "http://10.150.0.52:8774/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/3d14ef64-be16-47b6-9378-8bacba50bf91", "rel": "self"}, {"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/servers/3d14ef64-be16-47b6-9378-8bacba50bf91", "rel": "bookmark"}], "key_name": null, "image": {"id": "786654b5-dab6-4448-80ee-a15e810a31a2", "links": [{"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/images/786654b5-dab6-4448-80ee-a15e810a31a2", "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "flavor": {"id": "54ae82b7-c0c0-45cb-a39c-b55cc7ed8f28", "links": [{"href": "http://10.150.0.52:8774/951f2ba7f0c44ae6a38ea7a9db3897b2/f...

Read more...

Jacob Godin (jacobgodin) wrote :
Download full text (5.1 KiB)

It appears that this is a discrepancy between the returned value and the expected value. The DB stores the 'display_name' value:

+---------------------+---------------------+---------------------+---------+--------------------------------------+--------+----------------------------------+----------------------------------+---------+------+-------------------+---------------+------------+-------------+-----------+---------------+---------------------+---------------------+---------------------+--------------+---------------------+----------------------------------------------------------------------------------------------+------------------------------------------------+-------------+----------------+--------------+
| created_at | updated_at | deleted_at | deleted | id | ec2_id | user_id | project_id | host | size | availability_zone | instance_uuid | mountpoint | attach_time | status | attach_status | scheduled_at | launched_at | terminated_at | display_name | display_description | provider_location | provider_auth | snapshot_id | volume_type_id | source_volid |
+---------------------+---------------------+---------------------+---------+--------------------------------------+--------+----------------------------------+----------------------------------+---------+------+-------------------+---------------+------------+-------------+-----------+---------------+---------------------+---------------------+---------------------+--------------+---------------------+----------------------------------------------------------------------------------------------+------------------------------------------------+-------------+----------------+--------------+
| 2013-02-08 13:03:43 | 2013-02-08 13:03:45 | NULL | 0 | 49fda2f6-f2b2-49cf-a269-b3a5a5298777 | NULL | 15f9ce750c9f4c20b86c9e3e095c27ce | 951f2ba7f0c44ae6a38ea7a9db3897b2 | storage | 1 | nova | NULL | NULL | NULL | available | detached | 2013-02-08 13:03:43 | 2013-02-08 13:03:45 | NULL | test123 | NULL | 192.168.100.4:3260,3 iqn.2010-10.org.openstack:volume-49fda2f6-f2b2-49cf-a269-b3a5a5298777 1 | CHAP f3jjBN7FxtidUDbHUjt6 ZVAgk3SBeruJ8fcDgdDq | NULL | NULL | NULL |

However cinder returns the value as 'name':

REQ: curl -i http://10.150.0.55:8776/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/detail -X GET -H "X-Auth-Project-Id: Test" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: 2f26f0c46bd440dca59846548168c4ab"

2013-02-08T09:20:42.244936 GET http://10.150.0.55:8776/v2/951f2ba7f0c44ae6a38ea7a9db3897b2/volumes/detail
RESP: [200] {'date': 'Fri, 08 Feb 2013 13:20:42 GMT', 'x-compute-request-id': 'req-58b3976a-c3dd-44cc-95a1-7369c5eef535', 'content-type': 'application/json', 'content-length': '2066'}
RESP BODY: {"volumes": [{"status": "available", "attachments": [], "links": [{"href": "http://10...

Read more...

Mike Perez (thingee) on 2013-02-10
Changed in cinder:
assignee: nobody → Mike Perez (thingee)
status: New → In Progress
Mike Perez (thingee) wrote :

Hi Jacob, according to your logs you're using v2 of the cinder rest api, however, cinderclient only supports v1 currently. There's a blueprint for the cinderclient to support v2 here:

https://blueprints.launchpad.net/python-cinderclient/+spec/cinderclient-v2-support

In v2, display name changed to name to be consistent with other projects. Should be done in time for g3.

Jacob Godin (jacobgodin) wrote :

Hi Mike,

Thanks for the insight. Setting my endpoint back to v1 allows the proper info to be displayed:

+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 082b4c98-7d3f-4dcb-bf53-8fa78fa4e4a9 | available | Test | 1 | None | false | |
| 49fda2f6-f2b2-49cf-a269-b3a5a5298777 | available | test123 | 1 | None | false | |
| 8df78d86-2916-4f22-9eb7-9ee51131507f | available | test123 | 1 | None | false | |
| e720aa2d-ff7c-47ba-b141-b5c77940e9e9 | available | Test | 1 | None | false | |
| f68dfae0-7774-4064-8710-746f3018caf4 | available | Test | 1 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

Should we leave this bug as In Progress or Invalid?

Thanks

Changed in horizon:
status: Incomplete → Invalid
Mike Perez (thingee) wrote :

Hi Jacob,

v2 support is now in the latest cinderclient code, but has not been released yet.

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-03-15
Changed in cinder:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-04-04
Changed in cinder:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers