Bug 1749422

Summary: [RFE] [IPI] [OSP] Cluster deletion takes too much time to be completed when image-registry swift container has many objects
Product: OpenShift Container Platform Reporter: David Sanz <dsanzmor>
Component: InstallerAssignee: Eric Duen <eduen>
Installer sub component: openshift-installer QA Contact: David Sanz <dsanzmor>
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: low CC: adahiya, juriarte, pprinett
Version: 4.2.0Keywords: RFE
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-06 18:31:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Sanz 2019-09-05 14:59:26 UTC
Description of problem:
When trying to delete a cluster with image-registry swift container full of objects, those objects are being deleted one by one, making the process slow.

time="2019-09-05T12:29:52+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/0bbf823900eb5c03dece2838a4b47266a2a23116ac53cbc5174331bd52e062ac/link\n"
time="2019-09-05T12:29:53+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/14397bfd298563a89c6029a7a8ca597dfbdff75437a03d9869a9e5b19b1ac5af/link\n"
time="2019-09-05T12:29:53+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/228941dfdbbdb012b5ff14492973d94c695686e7ef94af763e432714fbe7d8af/link\n"
time="2019-09-05T12:29:54+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/2fb4ce79cca2da13b3c2286e7b5d0e2f6a6984a4cb3856b18e2e80cda6da46ab/link\n"
time="2019-09-05T12:29:54+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/6b3cb68a1e79985218660884d2f5006b84264f3c57f25348009c58d4a99d4bda/link\n"
time="2019-09-05T12:29:55+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/c99656bceae153ee30e46d5bfed683ed971342146445160a442425d2c069778a/link\n"
time="2019-09-05T12:29:55+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_layers/sha256/dea4c309033ac6b144a5c11db90d61f8c1e756f3d953f4db903b8bbf5e83efcd/link\n"
time="2019-09-05T12:29:56+02:00" level=debug msg="Deleting object: files/docker/registry/v2/repositories/nioxn/nodejs-ex/_manifests/revisions/sha256/16c092365a222bbefbec171a334beba629ee16170509204c22fa47b1f6f12fab/link\n"

We need to explore how to remove containers without needing to delete each object on it, as this process makes deletion process.

Related code:

https://github.com/openshift/cluster-image-registry-operator/blob/master/pkg/storage/swift/swift.go#L416-L442

https://github.com/gophercloud/gophercloud/blob/master/openstack/objectstorage/v1/containers/requests.go#L117-L121



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Add objects to the image-registry included on the OCP installation
2.Trigger cluster deletion
3.Watch installer log to track deletion of each object on the container

Actual results:
Process takes more time or less depending on the number of objects in the container

Expected results:
Container is full deleted no matters how many objects it contains

Additional info:

Comment 1 Abhinav Dahiya 2019-12-06 18:31:35 UTC
Let's not use bugzilla for RFE tracking. there is already is story attached.