Skip to content

NSFS | S3 | Versioning: InternalError upon PutObject over existing key in version-suspended bucket #8379

Closed
@hseipp

Description

@hseipp

Environment info

Actual behavior

Second PutBucket causes InternalError.

See the following test code:

    def test_s3cever102():
        client = get_client()
        bucket_name = get_new_bucket(client=client)
    
        # The following operation uses another client instance -> following operations will fail
    #    check_configure_versioning_retry(bucket_name, "Enabled", "Enabled")
        _ces_safe_check_configure_versioning_retry(client, bucket_name, "Enabled", "Enabled")
    
        _ces_safe_check_configure_versioning_retry(client, bucket_name, "Suspended", "Suspended")
    
        key_name = 'obj'
        data = 'object-1'
        response = client.put_object(Bucket=bucket_name, Key=key_name, Body=data)
        version_id = None
        try:
            version_id = response['VersionId']
        except KeyError:
            version_id = None
        assert version_id == None
    
        response = client.list_object_versions(Bucket=bucket_name)
        versions = response['Versions']
        assert versions[0]['VersionId'] == "null"
    
        data = 'object-2'
>       response = client.put_object(Bucket=bucket_name, Key=key_name, Body=data)
...
E           botocore.exceptions.ClientError: An error occurred (InternalError) when calling the PutObject operation (reached max retries: 4): We encountered an internal error. Please try again.

Expected behavior

PutBucket works and overwrites the previous object with the new content.

Steps to reproduce

Execute the above test code added to Ceph s3-tests.

More information - Screenshots / Logs / Other output

After the error occurred, it is not possible to delete the object using a simple aws s3 rm s3://bucket/key operation, these attempts also return InternalError.

Noobaa log with "all" log level attached
noobaa_20240917_4.log.gz

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions