Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cinder type-key failed

I used Grizzly in my setup. I follow the steps below: 1. create a volume type named 'lvm' root@openstack:~# cinder type-list +--------------------------------------+------+ | ID | Name | +--------------------------------------+------+ | fb18bbb9-7989-4b5d-b4d6-f61e5d071338 | lvm | +--------------------------------------+------+ 2. I want to add a extra_spec, I got error messages below: root@openstack:~# cinder --debug type-key fb18bbb9-7989-4b5d-b4d6-f61e5d071338 set volume_backend_name=LVM_iSCSI

REQ: curl -i http://182.168.61.50:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-cinderclient"

RESP: [200] {'date': 'Tue, 23 Apr 2013 00:43:45 GMT', 'content-type': 'application/json', 'content-length': '2527', 'vary': 'X-Auth-Token'} RESP BODY: {"access": {"token": {"issued_at": "2013-04-23T00:43:45.874472", "expires": "2013-04-24T00:43:45Z", "id": "ccee44c55d984709bba7953b4023e1fc", "tenant": {"description": null, "enabled": true, "id": "0bfe6a094db14ab6859146b3ad04aa0b", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://182.168.61.21:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b", "region": "RegionOne", "internalURL": "http://182.168.61.21:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b", "id": "76896678112445ed9c5c8a1184ec000f", "publicURL": "http://182.168.61.50:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://182.168.61.21:9696/", "region": "RegionOne", "internalURL": "http://182.168.61.21:9696/", "id": "011781d8487b428e8eeaf2d6c327c2b3", "publicURL": "http://182.168.61.50:9696/"}], "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints": [{"adminURL": "http://182.168.61.21:9292/v2", "region": "RegionOne", "internalURL": "http://182.168.61.21:9292/v2", "id": "1452ccfaccf642e18067648009a3658c", "publicURL": "http://182.168.61.50:9292/v2"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://182.168.61.21:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b", "region": "RegionOne", "internalURL": "http://182.168.61.21:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b", "id": "74acf246e96646b69c8201da993623ba", "publicURL": "http://182.168.61.50:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://182.168.61.21:8773/services/Admin", "region": "RegionOne", "internalURL": "http://182.168.61.21:8773/services/Cloud", "id": "75e1a71917dd4993a71d4e010e83852a", "publicURL": "http://182.168.61.50:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://182.168.61.21:35357/v2.0", "region": "RegionOne", "internalURL": "http://182.168.61.21:5000/v2.0", "id": "44576f97ccdf4fcca39721072c07cc41", "publicURL": "http://182.168.61.50:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "e20e552df6cf4340ac8f89ac5f4aa3ac", "roles": [{"name": "admin"}, {"name": "KeystoneServiceAdmin"}, {"name": "KeystoneAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["33a701e2e15541cea0311070ad6db1be", "b175dbd7bb6f4dee94680fd637dbe9fe", "695a5c7be0f849de8a40a3b5e712a67e"]}}}

REQ: curl -i http://182.168.61.50:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b/types/fb18bbb9-7989-4b5d-b4d6-f61e5d071338 -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: ccee44c55d984709bba7953b4023e1fc"

RESP: [200] {'date': 'Tue, 23 Apr 2013 00:43:45 GMT', 'x-compute-request-id': 'req-c15489c9-43dd-40dc-925f-13905edd6937', 'content-type': 'application/json', 'content-length': '97'} RESP BODY: {"volume_type": {"extra_specs": {}, "name": "lvm", "id": "fb18bbb9-7989-4b5d-b4d6-f61e5d071338"}}

DEBUG (shell:491) unhashable type: 'list' Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cinderclient/shell.py", line 488, in main OpenStackCinderShell().main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/cinderclient/shell.py", line 439, in main args.func(self.cs, args) File "/usr/lib/python2.7/dist-packages/cinderclient/v1/shell.py", line 481, in do_type_key keypair = _extract_metadata(args) File "/usr/lib/python2.7/dist-packages/cinderclient/v1/shell.py", line 105, in _extract_metadata metadata[key] = value TypeError: unhashable type: 'list' ERROR: unhashable type: 'list'

cinder type-key failed

I used Grizzly in my setup. I follow the steps below: below:

1. create a volume type named 'lvm' 'lvm'
root@openstack:~# cinder type-list +--------------------------------------+------+
+--------------------------------------+------+
| ID | Name | +--------------------------------------+------+ |
+--------------------------------------+------+
| fb18bbb9-7989-4b5d-b4d6-f61e5d071338 | lvm | +--------------------------------------+------+ |
+--------------------------------------+------+

2. I want to add a extra_spec, I got error messages below: below:
root@openstack:~# cinder --debug type-key fb18bbb9-7989-4b5d-b4d6-f61e5d071338 set volume_backend_name=LVM_iSCSI

REQ: curl -i http://182.168.61.50:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-cinderclient"

RESP: [200] {'date': 'Tue, 23 Apr 2013 00:43:45 GMT', 'content-type': 'application/json', 'content-length': '2527', 'vary': 'X-Auth-Token'} RESP BODY: {"access": {"token": {"issued_at": "2013-04-23T00:43:45.874472", "expires": "2013-04-24T00:43:45Z", "id": "ccee44c55d984709bba7953b4023e1fc", "tenant": {"description": null, "enabled": true, "id": "0bfe6a094db14ab6859146b3ad04aa0b", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://182.168.61.21:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b", "region": "RegionOne", "internalURL": "http://182.168.61.21:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b", "id": "76896678112445ed9c5c8a1184ec000f", "publicURL": "http://182.168.61.50:8774/v2/0bfe6a094db14ab6859146b3ad04aa0b"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://182.168.61.21:9696/", "region": "RegionOne", "internalURL": "http://182.168.61.21:9696/", "id": "011781d8487b428e8eeaf2d6c327c2b3", "publicURL": "http://182.168.61.50:9696/"}], "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints": [{"adminURL": "http://182.168.61.21:9292/v2", "region": "RegionOne", "internalURL": "http://182.168.61.21:9292/v2", "id": "1452ccfaccf642e18067648009a3658c", "publicURL": "http://182.168.61.50:9292/v2"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://182.168.61.21:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b", "region": "RegionOne", "internalURL": "http://182.168.61.21:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b", "id": "74acf246e96646b69c8201da993623ba", "publicURL": "http://182.168.61.50:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://182.168.61.21:8773/services/Admin", "region": "RegionOne", "internalURL": "http://182.168.61.21:8773/services/Cloud", "id": "75e1a71917dd4993a71d4e010e83852a", "publicURL": "http://182.168.61.50:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://182.168.61.21:35357/v2.0", "region": "RegionOne", "internalURL": "http://182.168.61.21:5000/v2.0", "id": "44576f97ccdf4fcca39721072c07cc41", "publicURL": "http://182.168.61.50:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "e20e552df6cf4340ac8f89ac5f4aa3ac", "roles": [{"name": "admin"}, {"name": "KeystoneServiceAdmin"}, {"name": "KeystoneAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["33a701e2e15541cea0311070ad6db1be", "b175dbd7bb6f4dee94680fd637dbe9fe", "695a5c7be0f849de8a40a3b5e712a67e"]}}}

REQ: curl -i http://182.168.61.50:8776/v1/0bfe6a094db14ab6859146b3ad04aa0b/types/fb18bbb9-7989-4b5d-b4d6-f61e5d071338 -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: ccee44c55d984709bba7953b4023e1fc"

RESP: [200] {'date': 'Tue, 23 Apr 2013 00:43:45 GMT', 'x-compute-request-id': 'req-c15489c9-43dd-40dc-925f-13905edd6937', 'content-type': 'application/json', 'content-length': '97'} RESP BODY: {"volume_type": {"extra_specs": {}, "name": "lvm", "id": "fb18bbb9-7989-4b5d-b4d6-f61e5d071338"}}

DEBUG (shell:491) unhashable type: 'list' Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cinderclient/shell.py", line 488, in main OpenStackCinderShell().main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/cinderclient/shell.py", line 439, in main args.func(self.cs, args) File "/usr/lib/python2.7/dist-packages/cinderclient/v1/shell.py", line 481, in do_type_key keypair = _extract_metadata(args) File "/usr/lib/python2.7/dist-packages/cinderclient/v1/shell.py", line 105, in _extract_metadata metadata[key] = value TypeError: unhashable type: 'list' ERROR: unhashable type: 'list''list'

am i missing something?