Bucket named 'X' has pending multipart uploads. Stop all multipart uploads first.

This post is also available in: Português

Those days, I was trying to remove a bucket from my Oracle Cloud Infrastructure and I kept receiving the error when confirming the delete operation:

Bucket named 'REGION_MIGRATION' has pending multipart uploads. Stop all multipart uploads first.

There is (still) no way to view through the console what are those "multipart downloads" that are blocking my delete. However, checking with oci-cli, I can see something:

$ oci os multipart list --bucket-name REGION_MIGRATION
{
  "data": [
    {
      "bucket": "REGION_MIGRATION",
      "namespace": "xxx",
      "object": "OCASNPRDORADB01_IMAGE_IMAGE_EXPORT2",
      "time-created": "2019-10-25T22:30:03.027000+00:00",
      "upload-id": "COPY_153-956b-5954-4de7-f9a9693abcd"
    },
    {
      "bucket": "REGION_MIGRATION",
      "namespace": "xxx",
      "object": "OCASNPRDORADB01_IMAGE_IMAGE_EXPORT_teste",
      "time-created": "2019-10-25T22:33:17.698000+00:00",
      "upload-id": "COPY_74c-7f22-34f7-3a30-847f7ee4efab"
    },
    {
      "bucket": "REGION_MIGRATION",
      "namespace": "xxx",
      "object": "OCASNPRDORADB01_IMAGE_IMAGE_EXPORT_teste",
      "time-created": "2019-10-25T22:34:51.427000+00:00",
      "upload-id": "COPY_80e-d664-e43a-f40d-f4760cfbcdef"
    }
  ]
}

to remove those incomplete multiparts tasks, I need to run "oci multipart os abort" command line:

$ oci os multipart abort --bucket-name REGION_MIGRATION \
--object-name OCASNPRDORADB01_IMAGE_IMAGE_EXPORT2 --upload-id COPY_153-956b-5954-4de7-f9a9693abcd
WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y
$ oci os multipart abort --bucket-name REGION_MIGRATION \
--object-name OCASNPRDORADB01_IMAGE_IMAGE_EXPORT_teste --upload-id COPY_74c-7f22-34f7-3a30-847f7ee4efab
WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y
$ oci os multipart abort --bucket-name REGION_MIGRATION \
--object-name OCASNPRDORADB01_IMAGE_IMAGE_EXPORT_teste --upload-id COPY_80e-d664-e43a-f40d-f4760cfbcdef
WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

And now listing again:

$ oci os multipart list --bucket-name REGION_MIGRATION
$

Voilá! Nothing is returned.

Trying to remove the bucket again now succeeded.

Have you enjoyed? Please leave a comment or give a 👍!

3 comments

    • Kay on December 10, 2019 at 12:30
    • Reply

    Very helpful, thanks!

    • Juan Pablo on December 26, 2019 at 10:03
    • Reply

    Thanks man! this was very helpful.

    • Sambasiva reddy on January 16, 2020 at 17:05
    • Reply

    Perfect

Leave a Reply

Your email address will not be published.