Failed attach cinder volume to instance

Bug #1821797 reported by zibort
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nova (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

There is a error at attaching cinder volume (rbd backend) to instance.
Release: Queens

# openstack server add volume 2788ffe5-fb54-4c97-8074-24b62cdfb65f bf137dcf-d537-4776-9a49-84a2b6bfccdd --debug
... skip ...
GET call to volumev2 for https://cloud.newton.local:8776/v2/79fb01fea5ed409784bad9564c4868a9/volumes/bf137dcf-d537-4776-9a49-84a2b6bfccdd used request id req-29c40a34-1799-4ff0-9b58-6c746634485a
REQ: curl -g -i -X POST https://cloud.newton.local:8774/v2.1/servers/2788ffe5-fb54-4c97-8074-24b62cdfb65f/os-volume_attachments -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}4d56b517dfb7ac035ec2c073c14ad70ef840faf7" -d '{"volumeAttachment": {"volumeId": "bf137dcf-d537-4776-9a49-84a2b6bfccdd"}}'
https://cloud.newton.local:8774 "POST /v2.1/servers/2788ffe5-fb54-4c97-8074-24b62cdfb65f/os-volume_attachments HTTP/1.1" 500 210
RESP: [500] Openstack-Api-Version: compute 2.1 X-Openstack-Nova-Api-Version: 2.1 Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version Content-Type: application/json; charset=UTF-8 Content-Length: 210 X-Openstack-Request-Id: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1 X-Compute-Request-Id: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1 Date: Tue, 26 Mar 2019 18:54:22 GMT Connection: keep-alive
RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'cinderclient.exceptions.Unauthorized'>", "code": 500}}

POST call to compute for https://cloud.newton.local:8774/v2.1/servers/2788ffe5-fb54-4c97-8074-24b62cdfb65f/os-volume_attachments used request id req-85d2caa3-ef54-4282-9b61-a4e70e0319b1
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'cinderclient.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 423, in take_action
    parsed_args.device,
  File "/usr/lib/python2.7/dist-packages/novaclient/api_versions.py", line 393, in substitution
    return methods[-1].func(obj, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/volumes.py", line 56, in create_server_volume
    body, "volumeAttachment")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 361, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 310, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 83, in request
    raise exceptions.from_response(resp, body, url, method)
ClientException: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'cinderclient.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1)
clean_up AddServerVolume: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'cinderclient.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 423, in take_action
    parsed_args.device,
  File "/usr/lib/python2.7/dist-packages/novaclient/api_versions.py", line 393, in substitution
    return methods[-1].func(obj, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/volumes.py", line 56, in create_server_volume
    body, "volumeAttachment")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 361, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 310, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 83, in request
    raise exceptions.from_response(resp, body, url, method)
ClientException: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'cinderclient.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-85d2caa3-ef54-4282-9b61-a4e70e0319b1)

END return value: 1

Revision history for this message
zibort (zibort) wrote :
Download full text (5.2 KiB)

Output of nova-api.log

192.168.123.10 "GET /v2.1/servers/2788ffe5-fb54-4c97-8074-24b62cdfb65f HTTP/1.1" status: 200 len: 2042 time: 1.3150780
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi [req-85d2caa3-ef54-4282-9b61-a4e70e0319b1 088d6b25b302447b808b71f1df29de15 79fb01fea5ed409784bad9564c4868a9 - default default] Unexpected exception in API method: Unauthorized: The request you have made requires authentication. (HTTP 401)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 788, in wrapped
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi return f(*args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/volumes.py", line 336, in create
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi supports_multiattach=supports_multiattach)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 204, in inner
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi return function(self, context, instance, *args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 152, in inner
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi return f(self, context, instance, *args, **kw)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 4065, in attach_volume
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi volume = self.volume_api.get(context, volume_id)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 379, in wrapper
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi res = method(self, ctx, *args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 401, in wrapper
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi res = method(self, ctx, volume_id, *args, **kwargs)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 467, in get
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openstack.wsgi context, microversion=microversion).volumes.get(volume_id)
2019-03-26 21:54:22.370 3564924 ERROR nova.api.openst...

Read more...

tags: added: nova
tags: added: attach cinder volume
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nova (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.