Plan Deletion Doesn't Use a Bulk Delete

Bug #1615825 reported by Ryan Brady
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Brad P. Crochet

Bug Description

See the comments on Plan Deletion Action patch[1] in tripleo-common.

The python-swiftclient project is used in tripleo-common when interacting with swift. The swiftclient library has no way to perform a deletion on a container that contains objects without iterating over the objects to delete them first.

Python-swiftclient doesn't provide access to a headers arg for us to inject the header. While there seems to be another document[2] that states we can use a querystring param with a POST request, the delete_container method does not provide a means to change the HTTP request method type.

Once swiftclient has been patched to allow access to headers for delete_container or provide another means to bulk delete a container, this code in tripleo-common should be updated.

[1]https://review.openstack.org/#/c/299937/15/tripleo_common/actions/plan.py@166
[2] http://docs.openstack.org/developer/swift/middleware.html#bulk-delete

Ryan Brady (rbrady)
Changed in tripleo:
assignee: nobody → Ryan Brady (rbrady)
Revision history for this message
Ryan Brady (rbrady) wrote :

From the reference [2] above, the bulk delete will not work in our case (container full of objects) as the container must be empty.

"or for a container (which must be empty at time of delete)"

Changed in tripleo:
status: New → In Progress
importance: Undecided → Medium
status: In Progress → Invalid
Revision history for this message
Thiago da Silva (thiagodasilva) wrote :

@Ryan, with bulk-delete you should be able to delete both objects and container[0], no?
[0] - https://docs.openstack.org/swift/latest/middleware.html#bulk-delete

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/553616

Dan Prince (dan-prince)
Changed in tripleo:
assignee: Ryan Brady (rbrady) → Dan Prince (dan-prince)
status: Invalid → In Progress
milestone: none → rocky-1
Revision history for this message
Carlos Camacho (ccamacho) wrote :

@Dan, do you have planned to backport this fi to stable/queens?

Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
assignee: Dan Prince (dan-prince) → Brad P. Crochet (brad-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/553616
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=f6891826c9ccaaca0614239d1f162a3f66a43162
Submitter: Zuul
Branch: master

commit f6891826c9ccaaca0614239d1f162a3f66a43162
Author: Dan Prince <email address hidden>
Date: Thu Mar 15 17:31:51 2018 -0400

    Use swift bulk-delete when deleting a plan

    Deleting swift containers (plans) with large numbers of files can
    take longer than we'd like.

    This patch uses the SwiftService API which contains an implementation
    of bulk delete used by the swift CLI which speeds up delete operations.

    Change-Id: I8362a7986e2e4ff0aecaf867faf47c24b658d15b
    Closes-bug: #1615825

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

This issue was fixed in the openstack/tripleo-common 10.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-common/+/855099

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (stable/train)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-common/+/855099
Reason: Train is about to transition to End of Life. Open patches needs to be abandoned before branch deletion.

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.