"openstack share delete --force" command sends two separate API requests to delete share

Bug #2051737 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
Fix Released
Undecided
Unassigned

Bug Description

When using the "--force" option, the share delete command is expected to issue a POST /v2/shares/<share-id> call to the server with a payload: "{'force_delete': null}".

The OSC command does this, but also issues a DELETE /v2/shares/<share-id> after. This second call is redundant and can fail if the share is already deleted by the force delete call that came in earlier.

[1] https://opendev.org/openstack/python-manilaclient/src/commit/8e777cb1b6c1dde9253753fdeca29f6aa12810b8/manilaclient/osc/v2/share.py#L351-L363

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

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/907242
Committed: https://opendev.org/openstack/python-manilaclient/commit/99be0ce9cc78b287170a5287c7bfd59038c7ecc2
Submitter: "Zuul (22348)"
Branch: master

commit 99be0ce9cc78b287170a5287c7bfd59038c7ecc2
Author: Kiran Pawar <email address hidden>
Date: Tue Jan 30 17:27:41 2024 +0000

    Fix share force delete case

    Manilaclient force delete sends two REST requests, first
    force delete and then delete. Fix it.

    Change-Id: I8257c04f2b5f1a02533dc0fa5d37ae6ff923a56a
    Closes-Bug: #2051737

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/python-manilaclient/+/909248

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/python-manilaclient/+/909249

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/909248
Committed: https://opendev.org/openstack/python-manilaclient/commit/6f53844d7f1052cdfb031cfbe2a0bd8ba750e272
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 6f53844d7f1052cdfb031cfbe2a0bd8ba750e272
Author: Kiran Pawar <email address hidden>
Date: Tue Jan 30 17:27:41 2024 +0000

    Fix share force delete case

    Manilaclient force delete sends two REST requests, first
    force delete and then delete. Fix it.

    Change-Id: I8257c04f2b5f1a02533dc0fa5d37ae6ff923a56a
    Closes-Bug: #2051737
    (cherry picked from commit 99be0ce9cc78b287170a5287c7bfd59038c7ecc2)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/909249
Committed: https://opendev.org/openstack/python-manilaclient/commit/39021ab858cab300fc06025771fb4eb13e299049
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 39021ab858cab300fc06025771fb4eb13e299049
Author: Kiran Pawar <email address hidden>
Date: Tue Jan 30 17:27:41 2024 +0000

    Fix share force delete case

    Manilaclient force delete sends two REST requests, first
    force delete and then delete. Fix it.

    Change-Id: I8257c04f2b5f1a02533dc0fa5d37ae6ff923a56a
    Closes-Bug: #2051737
    (cherry picked from commit 99be0ce9cc78b287170a5287c7bfd59038c7ecc2)
    (cherry picked from commit 6f53844d7f1052cdfb031cfbe2a0bd8ba750e272)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 4.8.0

This issue was fixed in the openstack/python-manilaclient 4.8.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.