Skip to content

NSFS | GPFS | fix delete latest object twice on GPFS #8358

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

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

nadavMiz
Copy link
Contributor

Explain the changes

  1. change to get gpfs_options only if latest version exists. if it doesn't this value isn't needed
  2. need to test on GPFS

Issues: Fixed #8346

Testing Instructions:

  1. need to test on GPFS
  • Doc added/updated
  • Tests added

@nadavMiz nadavMiz force-pushed the delete-the-latest-version-twice branch from 1154e10 to 1510f1c Compare September 12, 2024 14:19
@shirady
Copy link
Contributor

shirady commented Sep 18, 2024

Validation on GPFS cluster:

I used this RPM: noobaa-core-5.18.0-20240917-nsfs-nc-versioning-fixes.el9.x86_64.rpm
Which was created from this branch: nsfs-nc-versioning-fixes

Cluster node:

  1. We created an account using noobaa-cli: noobaa-cli account add --name s3user-5001 --uid 5001 --gid 5001 --new_buckets_path /ibm/fs1/teams/ (note new_buckets_path is running on GPFS, you can run df -T /ibm/fs1/teams/)

Client node:
2. Created the alias s3-u1='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint https://1<ip-address-of-node>:6443/ --no-verify-ssl'

  1. Create a bucket: s3-u1 s3 mb s3://user-5001-b04; echo $?
make_bucket: user-5001-b04
0
  1. versioning enabled: s3-u1 s3api put-bucket-versioning --bucket user-5001-b04 --versioning-configuration Status=Enabled and then s3-u1 s3api get-bucket-versioning --bucket user-5001-b04
{
    "Status": "Enabled"
}
  1. put an object (3 times): s3-u1 s3api put-object --bucket user-5001-b04 --key hello.txt
{
    "ETag": "\"mtime-d49g9qnwrk74-ino-1pmo\"",
    "VersionId": "mtime-d49g9qnwrk74-ino-1pmo"
}

{
    "ETag": "\"mtime-d49g9ul4o2kg-ino-1pmp\"",
    "VersionId": "mtime-d49g9ul4o2kg-ino-1pmp"
}

{
    "ETag": "\"mtime-d49g9yhdv4e8-ino-1pmr\"",
    "VersionId": "mtime-d49g9yhdv4e8-ino-1pmr"
}
  1. delete an object (twice): s3-u1 s3api delete-object --bucket user-5001-b04 --key hello.txt
{
    "DeleteMarker": true,
    "VersionId": "mtime-d49gac5ga328-ino-cn7"
}

{
    "DeleteMarker": true,
    "VersionId": "mtime-d49gaf2g785c-ino-cn4"
}
  1. list object-versions (ou can 3 versions and 2 delete-markers, "IsLatest": true, on the delete marker):
{
    "Versions": [
        {
            "ETag": "\"mtime-d49g9yhdv4e8-ino-1pmr\"",
            "Size": 0,
            "StorageClass": "STANDARD",
            "Key": "hello.txt",
            "VersionId": "mtime-d49g9yhdv4e8-ino-1pmr",
            "IsLatest": false,
            "LastModified": "2024-09-18T13:39:01+00:00",
            "Owner": {
                "DisplayName": "s3user-5001",
                "ID": "66ea982774ca1f62a8fb0005"
            }
        },
        {
            "ETag": "\"mtime-d49g9ul4o2kg-ino-1pmp\"",
            "Size": 0,
            "StorageClass": "STANDARD",
            "Key": "hello.txt",
            "VersionId": "mtime-d49g9ul4o2kg-ino-1pmp",
            "IsLatest": false,
            "LastModified": "2024-09-18T13:38:52+00:00",
            "Owner": {
                "DisplayName": "s3user-5001",
                "ID": "66ea982774ca1f62a8fb0005"
            }
        },
        {
            "ETag": "\"mtime-d49g9qnwrk74-ino-1pmo\"",
            "Size": 0,
            "StorageClass": "STANDARD",
            "Key": "hello.txt",
            "VersionId": "mtime-d49g9qnwrk74-ino-1pmo",
            "IsLatest": false,
            "LastModified": "2024-09-18T13:38:44+00:00",
            "Owner": {
                "DisplayName": "s3user-5001",
                "ID": "66ea982774ca1f62a8fb0005"
            }
        }
    ],
    "DeleteMarkers": [
        {
            "Owner": {
                "DisplayName": "s3user-5001",
                "ID": "66ea982774ca1f62a8fb0005"
            },
            "Key": "hello.txt",
            "VersionId": "mtime-d49gaf2g785c-ino-cn4",
            "IsLatest": true,
            "LastModified": "2024-09-18T13:39:37+00:00"
        },
        {
            "Owner": {
                "DisplayName": "s3user-5001",
                "ID": "66ea982774ca1f62a8fb0005"
            },
            "Key": "hello.txt",
            "VersionId": "mtime-d49gac5ga328-ino-cn7",
            "IsLatest": false,
            "LastModified": "2024-09-18T13:39:31+00:00"
        }
    ],
    "RequestCharged": null
}

Outputs are as expected, no errors.
@romayalon @nadavMiz

Copy link
Contributor

@romayalon romayalon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @nadavMiz please remove the relevant ceph tests from the pedning list (if it's not already running)

@nadavMiz nadavMiz force-pushed the delete-the-latest-version-twice branch 2 times, most recently from 9ed489f to 81bbb70 Compare September 18, 2024 17:18
@nadavMiz nadavMiz force-pushed the delete-the-latest-version-twice branch from 81bbb70 to 088a25f Compare September 18, 2024 17:49
@nadavMiz nadavMiz merged commit 3c8a29a into noobaa:master Sep 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSFS | S3 | Versioning: Double delete of object in version-enabled bucket fails
3 participants