Bucket named xxxx has pending multipart uploads. Stop all multipart uploads first.


So I received the above error while dropping the bucket in OCI object storage.




As the error reports there is files which are either being uploaded into the bucket or those files are stuck somewhere. As in our case there was no files were getting uploaded when I received the above error.

To find out what files are being uploaded run the following command from OS level. This should be run as os user from which the upload was initiated.

Command:- oci os multipart list –bucket-name <yourbucketname>

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120                                                  {

  "data": [

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_149_1",

      "time-created": "2020-11-24T20:59:47.752000+00:00",

      "upload-id": "2e55d944-e192-ae09-bf4e-8289eb2dcea4"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_153_1",

      "time-created": "2020-11-24T20:59:47.802000+00:00",

      "upload-id": "73d09a66-689d-558d-5570-4c8ae29fadcf"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_156_1",

      "time-created": "2020-11-24T20:59:48.094000+00:00",

      "upload-id": "91cad581-82e6-09d5-caf8-a4d4d5fa029a"

    }

  ]

}

 

So as we can see the above objects are stuck and didn’t upload successfully , because of that we are unable to delete the bucket.

To remove pending upload files.

Command:- oci os multipart abort -ns <object_storage_namespace> -bn <bucket_name> --object-name <object_name> --upload-id <upload_ID>

 

 [prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_149_1  --upload-id 2e55d944-e192-ae09-bf4e-8289eb2dcea4

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_153_1  --upload-id 73d09a66-689d-558d-5570-4c8ae29fadcf

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_156_1  --upload-id 91cad581-82e6-09d5-caf8-a4d4d5fa029a

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

  

Now check again if anymore pending files are there for upload.

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120

[prodtestdb@ccuine23 ~]$

[prodtestdb@ccuine23 ~]$

 

As there is no files left to upload, we can now safely drop the bucket.




No comments:

Post a Comment