you are right, the object's time has an issue. opened a tracker: https://tracker.ceph.com/issues/61310 to get the bucket owner, use: Request.Bucket.User.Id you can also get that from the user: Request.ObjectOwner.User.Id the "tenant" will be set only if you defined a tenant in your system. and either way. "Request.User.Id/Tenant" will give you the user that sent the request, not necessarily the owner of the bucket. you can also find full documentation of the lua fields here: https://docs.ceph.com/en/latest/radosgw/lua-scripting/ On Sat, May 20, 2023 at 6:12 AM huy nguyen <viplanghe6@xxxxxxxxx> wrote: > Thanks, postRequest context is what I actually need. > The Request.Object.Size is now correct, but MTime is still wrong. Beside > that, I also want to print the owner name of bucket or object using > Request.User.Tenant, but it doesn't return anything. > > Script: > if Request.HTTP.StorageClass == 'COLD' then > RGWDebugLog(Request.RGWOp .. " request with StorageClass: " .. > Request.HTTP.StorageClass .. " UserID:" .. tostring(Request.User.Tenant).. > " Obj name: " .. Request.Object.Name .. " Obj ID: > " .. Request.Object.Id .. " Size: " .. Request.Object.Size .. " MTime: " > .. Request.Object.MTime ) > > end > > Result: > Lua INFO: put_obj request with StorageClass: COLD UserID: Obj name: > test-object6 Obj ID: test-object6 Size: 1000 MTime: 1970-01-01 08:00:00 > _______________________________________________ > ceph-users mailing list -- ceph-users@xxxxxxx > To unsubscribe send an email to ceph-users-leave@xxxxxxx > > _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx