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 | CopyObject | Server Side Copy Gaps #8399

Open
romayalon opened this issue Sep 24, 2024 · 0 comments
Open

NSFS | CopyObject | Server Side Copy Gaps #8399

romayalon opened this issue Sep 24, 2024 · 0 comments
Labels

Comments

@romayalon
Copy link
Contributor

romayalon commented Sep 24, 2024

Environment info

  • NooBaa Version: 5.18
  • Platform: All

Actual behavior

Server side copy on NSFS doesn't support -

  1. Different creation time of the source and the target.
  2. Different tagging of the copy source and the target.

On GPFS we might want to consider mmclone instead of creating a hard link that shares system/extended attributes, and on POSIX we need to re-consider when to use server side copy for handling the above 2 issues.

Expected behavior

  1. All points above being supported.

Steps to reproduce

1. Creation time -
a. Start NooBaa NC - sudo node src/cmd/nsfs --debug=5
b. Upload an object - obj1.
c. copy obj1 to obj2 -

s3api copy-object --copy-source=bucket1/obj1 --bucket bucket1 --key=obj2
{
    "CopyObjectResult": {
        "ETag": "\"mtime-d4ebts669ou8-ino-t25nk\"",
        "LastModified": "2024-09-24T07:59:41+00:00"  // now
    }
}

c. Head Object obj2 -

s3api head-object --bucket bucket1 --key=obj2
{
    "AcceptRanges": "bytes",
    "LastModified": "2024-09-24T07:13:09+00:00",  // notice the change here from the copy result - last modified of obj1
    "ContentLength": 21,
    "ETag": "\"mtime-d4ebts669ou8-ino-t25nk\"",
    "ContentType": "application/octet-stream",
    "Metadata": {}
}

d. Head Object obj1 -

s3api head-object --bucket bucket1 --key=obj1
{
    "AcceptRanges": "bytes",
    "LastModified": "2024-09-24T07:13:09+00:00",
    "ContentLength": 21,
    "ETag": "\"mtime-d4ebts669ou8-ino-t25nk\"",
    "ContentType": "application/octet-stream",
    "Metadata": {}
}

2. Tagging of a copied object (server side copy = link) -
a. Start NooBaa NC - sudo node src/cmd/nsfs --debug=5
b. Upload an object -
s3api put-object --bucket bucket1 --key obj-with-tagging --body obj1
c. Put object tagging - s3api put-object-tagging --bucket bucket1 --key obj-with-tagging --tagging='{"TagSet": [{ "Key": "action", "Value": "create"}]}'
c. Copy object - s3api copy-object --copy-source=bucket1/obj-with-tagging --bucket bucket1 --key=obj-with-tagging-copy
d. Update the tagging on the copied object -

s3api put-object-tagging  --bucket bucket1 --key=obj-with-tagging-copy --tagging='{"TagSet": [{ "Key": "action", "Value": "delete"}]}'

d. Get Object Tagging - of the copied object -

s3api get-object-tagging  --bucket bucket1 --key=obj-with-tagging-copy
{
    "TagSet": [
        {
            "Key": "action",
            "Value": "delete"
        }
    ]
}

d. Get Object Tagging - of the source object - here is the bug - we changed the tagging of the source object

s3api get-object-tagging  --bucket bucket1 --key=obj-with-tagging
{
    "TagSet": [
        {
            "Key": "action",
            "Value": "delete"
        }
    ]
}

More information - Screenshots / Logs / Other output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant