POST /volume/v3/{id}/attachments returns a 202 response which is wrong

Bug #1747481 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Sean McGinnis

Bug Description

Seen here:

http://logs.openstack.org/57/537957/2/gate/nova-multiattach/456f61e/logs/screen-n-api.txt.gz#_Feb_05_15_52_27_956756

Feb 05 15:52:27.845552 ubuntu-xenial-inap-mtl01-0002370818 <email address hidden>[17077]: DEBUG cinderclient.v3.client [None req-334014d7-0596-4be6-aa0c-25e597eb1936 tempest-DeleteServersTestJSON-1391135272 tempest-DeleteServersTestJSON-1391135272] REQ: curl -g -i -X POST http://198.72.124.149/volume/v3/98b826c754214cdeae569d147336c6fc/attachments -H "X-Service-Token: {SHA1}f6bff6b6e0bf173574293d0227a7e4fb90bafe6f" -H "Accept: application/json" -H "User-Agent: python-cinderclient" -H "OpenStack-API-Version: volume 3.44" -H "X-Auth-Token: {SHA1}b4ae0194cfe79cc40f9c78136cb09e61c47aba94" -H "Content-Type: application/json" -H "X-OpenStack-Request-ID: req-334014d7-0596-4be6-aa0c-25e597eb1936" -d '{"attachment": {"instance_uuid": "197bb6f9-3410-4fdb-a2a7-88bf97c78e34", "connector": null, "volume_uuid": "28d1715e-5adc-408b-aaac-bf524fcbd54a"}}' {{(pid=17080) _http_log_request /usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py:372}}
Feb 05 15:52:27.956756 ubuntu-xenial-inap-mtl01-0002370818 <email address hidden>[17077]: DEBUG cinderclient.v3.client [None req-334014d7-0596-4be6-aa0c-25e597eb1936 tempest-DeleteServersTestJSON-1391135272 tempest-DeleteServersTestJSON-1391135272] RESP: [202] Date: Mon, 05 Feb 2018 15:52:27 GMT Server: Apache/2.4.18 (Ubuntu) x-compute-request-id: req-1ace3cef-4ab4-4a67-b55d-0d54b3b7cf17 Content-Type: application/json Content-Length: 271 OpenStack-API-Version: volume 3.44 Vary: OpenStack-API-Version x-openstack-request-id: req-1ace3cef-4ab4-4a67-b55d-0d54b3b7cf17 Connection: close

https://github.com/openstack/cinder/blob/97207a045f2c1726a51f93599ae77df33a216552/cinder/api/v3/attachments.py#L100

That should be a 200 response since it's blocking and returns a response body.

This likely can't change without a microversion bump though.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/540972

Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/540972
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fa353b2804b22815735ee0782b448603fa3d6853
Submitter: Zuul
Branch: master

commit fa353b2804b22815735ee0782b448603fa3d6853
Author: Sean McGinnis <email address hidden>
Date: Mon Feb 5 13:01:13 2018 -0600

    Correct attachment create success response code

    The attachment create call was returning HTTP ACCEPTED, which
    implies an asynchronous operation. This call is not async, so
    corrected this to return SUCCESS instead.

    Change-Id: Ieae4e883a77ede0ba0c8a5fca4423f45e0212b2b
    Closes-bug: #1747481

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 13.0.0.0b1

This issue was fixed in the openstack/cinder 13.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/647631

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/queens)

Reviewed: https://review.openstack.org/647631
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=2627b2f63fe48a0a3e528aeddaec4a99631015c7
Submitter: Zuul
Branch: stable/queens

commit 2627b2f63fe48a0a3e528aeddaec4a99631015c7
Author: Sean McGinnis <email address hidden>
Date: Mon Feb 5 13:01:13 2018 -0600

    Correct attachment create success response code

    The attachment create call was returning HTTP ACCEPTED, which
    implies an asynchronous operation. This call is not async, so
    corrected this to return SUCCESS instead.

    Change-Id: Ieae4e883a77ede0ba0c8a5fca4423f45e0212b2b
    Closes-bug: #1747481
    (cherry picked from commit fa353b2804b22815735ee0782b448603fa3d6853)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.7

This issue was fixed in the openstack/cinder 12.0.7 release.

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.