Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hseipp opened this issue Sep 17, 2024 · 0 comments · Fixed by #8386

Comments

@hseipp
Copy link

hseipp commented Sep 17, 2024

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

@hseipp hseipp added the NS-FS label Sep 17, 2024
@hseipp hseipp changed the title NSFS | S3 | Versioning: InternalError upon PutObject over exisiting key in version-suspended bucket NSFS | S3 | Versioning: InternalError upon PutObject over existing key in version-suspended bucket Sep 18, 2024
@nadavMiz nadavMiz self-assigned this Sep 19, 2024
@shirady shirady removed their assignment Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants