noobaa-core
noobaa-core copied to clipboard
NSFS | CopyObject | Server Side Copy Gaps
Environment info
- NooBaa Version: 5.18
- Platform: All
Actual behavior
Server side copy on NSFS doesn't support -
- Different creation time of the source and the target.
- 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
- 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"
}
]
}