Re: RGW/Lua script does not show logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Can you please explain what S3 operations you perform on the RGW?
I tried the 2nd script with "make bucket" and "put object", and got:

2024-04-09T13:54:00.608+0000 7f93b3987640 20 Lua INFO: bucket operation
logs:
2024-04-09T13:54:00.608+0000 7f93b3987640 20 Lua INFO:   Name: fish
2024-04-09T13:54:00.608+0000 7f93b3987640 20 Lua INFO:   Id:
5a95e229-e949-4e6a-9c90-a2cfacb62bca.4143.1

On Tue, Apr 9, 2024 at 12:30 AM <soyoon.lee@xxxxxxxxxxx> wrote:

> Hello, I wrote a Lua script in order to retrieve RGW logs such as bucket
> name, bucket owner, etc.
> However, when I apply a lua script I wrote using the below command, I do
> not see any logs start with Lua: INFO
>
> radosgw-admin script put --infile=/usr/tmp/testPreRequest.lua
> --context=postrequest
>
> <my lua script>
> function print_bucket_log(bucket)
>   RGWDebugLog("  Name: " .. bucket.Name)
> end
>
> if Request.Bucket then
>   RGWDebugLog("bucket operation logs: ")
>   print_bucket_log(Request.Bucket)
> end
>
>
> According to the official document regarding Lua Scripting,
> The RGWDebugLog() function accepts a string and prints it to the debug log
> with priority 20. Each log message is prefixed Lua INFO:. This function has
> no return value.
> even though I set debug_rgw = 20, I do not see any logs.
>
> However, if when I apply the below lua script with bucket.Id, I am getting
> Lua: ERROR like below:
> Lua ERROR: [string "function print_bucket_log(bucket)..."]:3: attempt to
> concatenate a nil value (field 'Id')
>
> <my lua script>
> function print_bucket_log(bucket)
>   RGWDebugLog("  Name: " .. bucket.Name)
>   RGWDebugLog("  Id: " .. bucket.Id)
> end
>
> if Request.Bucket then
>   RGWDebugLog("bucket operation logs: ")
>   print_bucket_log(Request.Bucket)
> end
>
>
> Any help would be very appreciated!
> _______________________________________________
> 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




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux