Lua scripting in radoswg

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

 



Hi,

I’m doing my first steps with CEPH. I’ve installed a cluster following this guide (https://ralph.blog.imixs.com/2021/10/03/ceph-pacific-running-on-debian-11-bullseye/) and have a pacific release (16.2.7) running with docker containers on debian hosts.

I’ve then deployed the rgw daemon and have that working as well with beast as webserver, with an haproxy as load balancer (for the tests I’m using only one of the daemons). This is also working great with a variety of S3 compatble clients :)

Now I’m trying the lua scripting part (https://docs.ceph.com/en/pacific/radosgw/lua-scripting/) here I’ve meet with many obstacles:

- The Docker containers are based on Centos 8 and their repos don’t work anyomore, it’s already addressed and I’ve just change to vault repos.
- Some trouble with luarocks dependencies (specially with the luasocket one)

After a lot of thinkering I've a working script sending data to an elasticsearch, but for some reasons I cannot access a lot of fileds from the Request variable, specially I cannot access fields like Request.Object, Request.Bucket or Request.User. :

debug 2022-02-16T15:16:04.685+0000 7f66417d4700  1 ====== starting new request req=0x7f6757529620 =====
debug 2022-02-16T15:16:04.689+0000 7f66417d4700  1 req 4355535815128688423 0.004000185s Lua ERROR: [string "local elasticsearch = require ("elasticsearch")..."]:46: attempt to index a nil value (field 'Bucket')
debug 2022-02-16T15:16:04.693+0000 7f664a7e6700  1 req 4355535815128688423 0.008000370s op->ERRORHANDLER: err_no=-2002 new_err_no=-2002


Others like Request.RGWOp. or Request.RGWOp works well. 

My script is mostly based on this one (https://github.com/ceph/ceph/blob/master/examples/lua/elasticsearch_adapter.lua), I know thats from the master branch, but the docs for pacific has the same fields for that variable.

I’ve the script running in preRequest, as loading it in postRequest doesn’t seem to work (I don’t get any errors but it doesn’t do anything). 

I think I’m missing something but I cannot find what is it, any help would be appreciated.

Thanks!!
========================================
Koldo Aingeru Marcos Fdez.  
Ingeniería de Sistemas
Sarenet S.A.U.
944209470
Parque Tecnológico, Edificio 103
48170 Zamudio, Bizkaia
www.sarenet.es
========================================







_______________________________________________
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