swift delete container will orphan segments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Invalid
|
Undecided
|
Unassigned | ||
python-swiftclient |
New
|
Undecided
|
Unassigned |
Bug Description
by default "swift delete container object" will remove the segments if object is a SLO
(nvidia) clayg@banana:
DEBUG:urllib3.
DEBUG:urllib3.
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:urllib3.
DEBUG:urllib3.
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:urllib3.
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:swiftclie
test.big
but "swift delete container" will orphan the segments - when I delete a container with >10K objects I noticed the segments were left behind and confirmed via logs all the DELETE requests were made with w/o any query params.
Given that behavior I find this help output misleading:
(nvidia) clayg@banana:
Usage: swift delete [--all] [--leave-segments]
Delete a container or objects within a container.
Positional arguments:
[<container>] Name of container to delete from.
[<object>] Name of object to delete. Specify multiple times
Optional arguments:
-a, --all Delete all containers and objects. Implies --versions.
--versions Delete all versions.
--leave-segments Do not delete segments of manifest objects.
-H, --header <header:value>
--object-threads <threads>
--container-
--prefix <prefix> Only delete objects beginning with <prefix>.
--version-id <version-id>
I think we should fix the help output or change the behavior. Tested on python-
N.B. in my simple dev test with only one object in the container it seems to work as you expect. Upon closer inspection I noticed my DELETE logs had source=BD
description: | updated |
Changed in swift: | |
status: | New → Invalid |
description: | updated |
description: | updated |
Related fix proposed to branch: master /review. opendev. org/c/openstack /python- swiftclient/ +/915507
Review: https:/