I'm getting error as "MissingSchema: Invalid URL u'<none>/volumes/909ceade-3ef0-42a2-8ebc-58f3f65648bf': No schema supplied"
While attaching volume to instance with nova volume-attach command.
I am using cinder to create and mange block storage,
Volumes are create using cinder command and could be shown using nova volume-list command, even LV is created at backend.
However when trying to attach new volume to instance I'm getting this error in nova api.log
Log trace is below.
Here are details of volume-attach command:
nova --debug volume-attach 57d6482f-838c-4513-86a0-3b0fe205d510 909ceade-3ef0-42a2-8ebc-58f3f65648bf /dev/sdb1
REQ: curl -i http://controller:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "XXXXX"}}}'
INFO (connectionpool:203) Starting new HTTP connection (1): controller
DEBUG (connectionpool:295) "POST /v2.0/tokens HTTP/1.1" 200 5686
RESP: [200] {'date': 'Wed, 26 Feb 2014 12:38:53 GMT', 'content-type': 'application/json', 'content-length': '5686', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"issued_at": "2014-02-26T12:38:53.128484", "expires": "2014-02-27T12:38:53Z", "id": "MIIKRgYJKoZIhvcNAQcCoIIKNzCCCj.......fTAuzAT2fWzr0VNWqoaElfuMjIVQ7GKe-0iq0j3uIPKp0", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "8fa0f51b94704628973164d39f7c1cc2", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://controller:8776/v1/8fa0f51b94704628973164d39f7c1cc2", "region": "regionOne", "internalURL": "http://controller:8776/v1/8fa0f51b94704628973164d39f7c1cc2", "id": "67761a3d8381429ebe826cbe7c04dfe2", "publicURL": "http://controller:8776/v1/8fa0f51b94704628973164d39f7c1cc2"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://controller:9292", "region": "regionOne", "internalURL": "http://controller:9292", "id": "445dd4449a2244d29c34e3326f46b28f", "publicURL": "http://controller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2", "region": "regionOne", "internalURL": "http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2", "id": "ac367e68db814fd5ab8b2bc8ee290545", "publicURL": "http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://controller:35357/v2.0", "region": "regionOne", "internalURL": "http://controller:5000/v2.0", "id": "038074c8e340491284ac824fb735fdfc", "publicURL": "http://controller:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}, {"endpoints": [{"adminURL": "http://controller:8776/v2/8fa0f51b94704628973164d39f7c1cc2", "region": "regionOne", "internalURL": "http://controller:8776/v2/8fa0f51b94704628973164d39f7c1cc2", "id": "12c13ce5590547f6b684f93f0af79b87", "publicURL": "http://controller:8776/v2/8fa0f51b94704628973164d39f7c1cc2"}], "endpoints_links": [], "type": "volumev2", "name": "cinderv2"}], "user": {"username": "admin", "roles_links": [], "id": "5f9b5ab95d4d4f6ead90373c9adb373d", "roles": [{"name": "_member_"}, {"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "2dac005d2508441fa2a5aa87b8f46761"]}}}
REQ: curl -i http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510 -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: MIIKRgYJKoZIhvcNAQcCoIIKNzCCCj....fuMjIVQ7GKe-0iq0j3uIPKp0"
INFO (connectionpool:203) Starting new HTTP connection (1): controller
DEBUG (connectionpool:295) "GET /v2/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510 HTTP/1.1" 200 1791
RESP: [200] {'date': 'Wed, 26 Feb 2014 12:38:53 GMT', 'content-length': '1791', 'content-type': 'application/json', 'x-compute-request-id': 'req-196f9167-2aa3-4ed5-be0b-b730fb09ffd4'}
RESP BODY: {"server": {"status": "SHUTOFF", "updated": "2014-02-24T21:31:46Z", "hostId": "5a8f3af268eb410a1750f73e4dacc7a3e3ab1c198edf96d3d7855fee", "OS-EXT-SRV-ATTR:host": "controller", "addresses": {"mynet": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:a7:90:20", "version": 4, "addr": "192.168.32.5", "OS-EXT-IPS:type": "fixed"}], "vmnet": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:0e:97:d0", "version": 4, "addr": "10.0.0.7", "OS-EXT-IPS:type": "fixed"}]}, "links": [{"href": "http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510", "rel": "self"}, {"href": "http://controller:8774/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510", "rel": "bookmark"}], "key_name": "mykey", "image": {"id": "5527041a-0963-40c7-a0b5-d48da5d737dc", "links": [{"href": "http://controller:8774/8fa0f51b94704628973164d39f7c1cc2/images/5527041a-0963-40c7-a0b5-d48da5d737dc", "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "stopped", "OS-EXT-SRV-ATTR:instance_name": "instance-00000010", "OS-SRV-USG:launched_at": "2014-02-24T18:11:06.000000", "OS-EXT-SRV-ATTR:hypervisor_hostname": "controller", "flavor": {"id": "3", "links": [{"href": "http://controller:8774/8fa0f51b94704628973164d39f7c1cc2/flavors/3", "rel": "bookmark"}]}, "id": "57d6482f-838c-4513-86a0-3b0fe205d510", "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, "OS-EXT-AZ:availability_zone": "nova", "user_id": "5f9b5ab95d4d4f6ead90373c9adb373d", "name": "centos_002_01", "created": "2014-02-24T18:06:23Z", "tenant_id": "8fa0f51b94704628973164d39f7c1cc2", "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": [], "accessIPv4": "", "accessIPv6": "", "OS-EXT-STS:power_state": 4, "config_drive": "", "metadata": {}}}
REQ: curl -i http://controller:8774/v2/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510/os-volume_attachments -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: MIIKRgYJKoZIhvcNAQcCoIIKNzCCCjMCA...0VNWqoaElfuMjIVQ7GKe-0iq0j3uIPKp0" -d '{"volumeAttachment": {"device": "/dev/sdb1", "volumeId": "909ceade-3ef0-42a2-8ebc-58f3f65648bf"}}'
DEBUG (connectionpool:295) "POST /v2/8fa0f51b94704628973164d39f7c1cc2/servers/57d6482f-838c-4513-86a0-3b0fe205d510/os-volume_attachments HTTP/1.1" 500 128
RESP: [500] {'date': 'Wed, 26 Feb 2014 12:38:53 GMT', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-bad74caa-2eba-459f-9884-79d690c8981d'}
RESP BODY: {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
DEBUG (shell:740) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bad74caa-2eba-459f-9884-79d690c8981d)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 737, in main
OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 673, in main
args.func(self.cs, args)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1674, in do_volume_attach
args.device)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/volumes.py", line 119, in create_server_volume
body, "volumeAttachment")
File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 145, in _create
_resp, body = self.api.client.post(url, body=body)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 232, in post
return self._cs_request(url, 'POST', *kwargs)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 213, in _cs_request
*kwargs)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 195, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 189, in request
raise exceptions.from_response(resp, body, url, method)
ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bad74caa-2eba-459f-9884-79d690c8981d)
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bad74caa-2eba-459f-9884-79d690c8981d)