manila does not return the request ID when using shrink and extend APIs

Bug #1815532 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

How to reproduce:

1) Use a backend that supports shrinking (ex: ZFSOnLinux, dummy, see [1] for more)
2) Create a share of size 3
3) Try to shrink the share to size 2, this can be done with the manila client, use the "--debug" switch for the client to log the request and response
4) Try to extend the share back to size 3, again, if using manilaclient, use "--debug"to log the request and response

We expect that the request ID is returned as part of the response body, but it isn't true for these APIs:

Example log:

REQ: curl -i -X POST http://10.10.10.5:8786/v2/cadd7139bc3148b8973df097c0911016/shares/ec0b7b5b-72a9-495a-a4bc-843da992eac3/action -H "X-Openstack-Manila-Api-Version: 2.48" -H "X-Auth-Token <SOMEAUTHTOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-manilaclient" -d '{"shrink": {"new_size": 2}}'

DEBUG (httpclient:192)
REQ: curl -i -X POST http://10.10.10.5:8786/v2/cadd7139bc3148b8973df097c0911016/shares/ec0b7b5b-72a9-495a-a4bc-843da992eac3/action -H "X-Openstack-Manila-Api-Version: 2.48" -H "X-Auth-Token: <SOMEAUTHTOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-manilaclient" -d '{"shrink": {"new_size": 2}}'

DEBUG (connectionpool:205) Starting new HTTP connection (1): 10.10.10.5:8786
DEBUG (connectionpool:393) http://10.10.10.5:8786 "POST /v2/cadd7139bc3148b8973df097c0911016/shares/ec0b7b5b-72a9-495a-a4bc-843da992eac3/action HTTP/1.1" 202 0
RESP: [202] {'Content-Length': '0', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close', 'Server': 'Apache/2.4.18 (Ubuntu)', 'X-OpenStack-Manila-API-Version': '2.48', 'Date': 'Mon, 11 Feb 2019 23:02:51 GMT', 'Content-Type': 'text/html; charset=UTF-8'}
RESP BODY:

DEBUG (httpclient:201) RESP: [202] {'Content-Length': '0', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close', 'Server': 'Apache/2.4.18 (Ubuntu)', 'X-OpenStack-Manila-API-Version': '2.48', 'Date': 'Mon, 11 Feb 2019 23:02:51 GMT', 'Content-Type': 'text/html; charset=UTF-8'}
RESP BODY:

[1] https://docs.openstack.org/manila/latest/admin/share_back_ends_feature_support_mapping.html#mapping-of-share-drivers-and-share-features-support

Changed in manila:
importance: Undecided → High
Changed in manila:
importance: High → Medium
milestone: none → stein-3
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-tempest-plugin (master)

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

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

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

Reviewed: https://review.openstack.org/637318
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=52db0754fe29df2d56ec642cdab75f11b21e85c0
Submitter: Zuul
Branch: master

commit 52db0754fe29df2d56ec642cdab75f11b21e85c0
Author: Goutham Pacha Ravi <email address hidden>
Date: Fri Feb 15 14:14:15 2019 -0800

    Return request-id to APIs that don't respond with a body

    Request-IDs help track actions initiated via the API.
    With this patch, we can supply the request ID in the
    following APIs:
    - POST {resource}/action APIs for actions such as
      'reset-state', 'force-delete', 'shrink',
      'extend', 'manage', 'deny_access', 'addProjectAccess',
      'removeProjectAccess', 'promote', 'resync', 'unmanage',
      'revert', 'migration_start', 'migration_complete',
      'migration_cancel'
    - POST /share_unmanage/{id}
    - DELETE /{resource}/{id} APIs for
      shares, share networks, share groups, share replicas,
      security services, share servers, share snapshots,
      extra specs, messages, quota sets, share-group-snapshots,
      group specs, share-group-types, share types

    Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
    Closes-Bug: #1815532

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/638326

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

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

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

Reviewed: https://review.openstack.org/638326
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=d06801153d7879de74055cd789001e5109040192
Submitter: Zuul
Branch: stable/rocky

commit d06801153d7879de74055cd789001e5109040192
Author: Goutham Pacha Ravi <email address hidden>
Date: Fri Feb 15 14:14:15 2019 -0800

    Return request-id to APIs that don't respond with a body

    Request-IDs help track actions initiated via the API.
    With this patch, we can supply the request ID in the
    following APIs:
    - POST {resource}/action APIs for actions such as
      'reset-state', 'force-delete', 'shrink',
      'extend', 'manage', 'deny_access', 'addProjectAccess',
      'removeProjectAccess', 'promote', 'resync', 'unmanage',
      'revert', 'migration_start', 'migration_complete',
      'migration_cancel'
    - POST /share_unmanage/{id}
    - DELETE /{resource}/{id} APIs for
      shares, share networks, share groups, share replicas,
      security services, share servers, share snapshots,
      extra specs, messages, quota sets, share-group-snapshots,
      group specs, share-group-types, share types

    Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
    Closes-Bug: #1815532
    (cherry picked from commit 52db0754fe29df2d56ec642cdab75f11b21e85c0)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/queens)

Reviewed: https://review.openstack.org/643646
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=534aed13d7f831e2c828ebb28cd9fc1bc6255d7a
Submitter: Zuul
Branch: stable/queens

commit 534aed13d7f831e2c828ebb28cd9fc1bc6255d7a
Author: Goutham Pacha Ravi <email address hidden>
Date: Fri Feb 15 14:14:15 2019 -0800

    Return request-id to APIs that don't respond with a body

    Request-IDs help track actions initiated via the API.
    With this patch, we can supply the request ID in the
    following APIs:
    - POST {resource}/action APIs for actions such as
      'reset-state', 'force-delete', 'shrink',
      'extend', 'manage', 'deny_access', 'addProjectAccess',
      'removeProjectAccess', 'promote', 'resync', 'unmanage',
      'revert', 'migration_start', 'migration_complete',
      'migration_cancel'
    - POST /share_unmanage/{id}
    - DELETE /{resource}/{id} APIs for
      shares, share networks, share groups, share replicas,
      security services, share servers, share snapshots,
      extra specs, messages, quota sets, share-group-snapshots,
      group specs, share-group-types, share types

    Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
    Closes-Bug: #1815532
    (cherry picked from commit 52db0754fe29df2d56ec642cdab75f11b21e85c0)
    (cherry picked from commit ce111ed14e089599512fdcd74219fac30b6d3772)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/644371

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

Reviewed: https://review.openstack.org/644371
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=a9f6638118351682e213201fdb7888065c75471d
Submitter: Zuul
Branch: stable/pike

commit a9f6638118351682e213201fdb7888065c75471d
Author: Goutham Pacha Ravi <email address hidden>
Date: Fri Feb 15 14:14:15 2019 -0800

    Return request-id to APIs that don't respond with a body

    Request-IDs help track actions initiated via the API.
    With this patch, we can supply the request ID in the
    following APIs:
    - POST {resource}/action APIs for actions such as
      'reset-state', 'force-delete', 'shrink',
      'extend', 'manage', 'deny_access', 'addProjectAccess',
      'removeProjectAccess', 'promote', 'resync', 'unmanage',
      'revert', 'migration_start', 'migration_complete',
      'migration_cancel'
    - POST /share_unmanage/{id}
    - DELETE /{resource}/{id} APIs for
      shares, share networks, share groups, share replicas,
      security services, share servers, share snapshots,
      extra specs, messages, quota sets, share-group-snapshots,
      group specs, share-group-types, share types

    Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
    Closes-Bug: #1815532
    (cherry picked from commit 52db0754fe29df2d56ec642cdab75f11b21e85c0)
    (cherry picked from commit ce111ed14e089599512fdcd74219fac30b6d3772)
    (cherry picked from commit 534aed13d7f831e2c828ebb28cd9fc1bc6255d7a)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 8.0.0.0rc1

This issue was fixed in the openstack/manila 8.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 6.2.0

This issue was fixed in the openstack/manila 6.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-tempest-plugin (master)

Reviewed: https://review.openstack.org/637317
Committed: https://git.openstack.org/cgit/openstack/manila-tempest-plugin/commit/?id=5782a704127400728c07d0249621fb3111523a5f
Submitter: Zuul
Branch: master

commit 5782a704127400728c07d0249621fb3111523a5f
Author: Goutham Pacha Ravi <email address hidden>
Date: Fri Feb 15 14:37:13 2019 -0800

    Verify request ID in all manila responses

    All requests to manila API must return
    a request ID in the response headers.

    This change adds validation to ensure
    no new APIs are added that invalidate this
    criterion.

    Change-Id: If9b033109a653913b62ce9588011d2d7f00e0519
    Partial-Bug: #1815532

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 7.2.0

This issue was fixed in the openstack/manila 7.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 5.1.0

This issue was fixed in the openstack/manila 5.1.0 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.