Re: Lua patchset merged

2015-03-10 Thread Willy Tarreau
On Tue, Mar 10, 2015 at 12:40:03AM +0100, Thierry FOURNIER wrote: On Mon, 09 Mar 2015 22:11:56 +0100 Cyril Bonté cyril.bo...@free.fr wrote: I've also seen this commit : MEDIUM: lua: use the Lua-5.3 version of the library [1] This one may be annoying in the short term for some users,

Re: Lua patchset merged

2015-03-10 Thread Willy Tarreau
On Tue, Mar 10, 2015 at 02:08:40AM +0100, Thierry FOURNIER wrote: On Tue, 10 Mar 2015 01:05:50 +0100 Cyril Bonté cyril.bo...@free.fr wrote: Hi again, Le 10/03/2015 00:40, Thierry FOURNIER a écrit : On Mon, 09 Mar 2015 22:11:56 +0100 Cyril Bonté cyril.bo...@free.fr wrote: I've

Re: Lua patchset merged

2015-03-10 Thread Willy Tarreau
All patches merged, thanks Thierry. Willy

Re: Lua patchset merged

2015-03-09 Thread Cyril Bonté
Hi Thierry, Le 04/03/2015 21:20, Cyril Bonté a écrit : Hi Thierry, Le 04/03/2015 11:51, Thierry FOURNIER a écrit : Thank you Cyril for the bug repport. I join the patch that fix this issue. Great ! I didn't have time to investigate further. I can confirm that the patch works well ;-) I've

Re: Lua patchset merged

2015-03-09 Thread Thierry FOURNIER
On Mon, 09 Mar 2015 22:11:56 +0100 Cyril Bonté cyril.bo...@free.fr wrote: Hi Thierry, Le 04/03/2015 21:20, Cyril Bonté a écrit : Hi Thierry, Le 04/03/2015 11:51, Thierry FOURNIER a écrit : Thank you Cyril for the bug repport. I join the patch that fix this issue. Great ! I

Re: Lua patchset merged

2015-03-09 Thread Cyril Bonté
Hi again, Le 10/03/2015 00:40, Thierry FOURNIER a écrit : On Mon, 09 Mar 2015 22:11:56 +0100 Cyril Bonté cyril.bo...@free.fr wrote: I've seen new commits that have been merged on the git repository. The bad news are that the previous test that I reported (sending a response larger than the

Re: Lua patchset merged

2015-03-09 Thread Thierry FOURNIER
On Tue, 10 Mar 2015 01:05:50 +0100 Cyril Bonté cyril.bo...@free.fr wrote: Hi again, Le 10/03/2015 00:40, Thierry FOURNIER a écrit : On Mon, 09 Mar 2015 22:11:56 +0100 Cyril Bonté cyril.bo...@free.fr wrote: I've seen new commits that have been merged on the git repository. The bad news

Re: Lua patchset merged

2015-03-05 Thread Steven Le Roux
Hi, why not just a github so that people can fork, play and submit their own Lua scripts? On Thu, Mar 5, 2015 at 8:00 AM, Willy Tarreau w...@1wt.eu wrote: On Mon, Mar 02, 2015 at 11:33:39PM +0100, Baptiste wrote: I love it ! Just wrote, as a proof of concept, a forward

Re: Lua patchset merged

2015-03-05 Thread Willy Tarreau
Hi Steven, On Thu, Mar 05, 2015 at 11:16:14PM +0100, Steven Le Roux wrote: Hi, why not just a github so that people can fork, play and submit their own Lua scripts? Well, anyone can just do that by himself. I meant something more discussion-oriented than development-oriented. Probably the

Re: Lua patchset merged

2015-03-04 Thread Cyril Bonté
Hi Thierry, Le 04/03/2015 11:51, Thierry FOURNIER a écrit : Thank you Cyril for the bug repport. I join the patch that fix this issue. Great ! I didn't have time to investigate further. I can confirm that the patch works well ;-) -- Cyril Bonté

Re: Lua patchset merged

2015-03-04 Thread Thierry FOURNIER
On Tue, 03 Mar 2015 19:35:34 +0100 Cyril Bonté cyril.bo...@free.fr wrote: Hi Thierry, Le 01/03/2015 13:47, Thierry FOURNIER a écrit : HAProxy Lua Hello world HAProxy configuration file (hello_world.conf): global lua-load hello_world.lua listen proxy bind

Re: Lua patchset merged

2015-03-03 Thread Cyril Bonté
Hi Thierry, Le 01/03/2015 13:47, Thierry FOURNIER a écrit : HAProxy Lua Hello world HAProxy configuration file (hello_world.conf): global lua-load hello_world.lua listen proxy bind 127.0.0.1:10001 tcp-request content lua hello_world HAProxy Lua file (hello_world.lua):

Re: Lua patchset merged

2015-03-02 Thread Baptiste
I love it ! Just wrote, as a proof of concept, a forward proxy... That said, it seems my lua script is blocking... I mean, if the remote server is slow to deliver the response, then HAProxy doesn't process any other request or response. Baptiste

Re: Lua patchset merged

2015-03-02 Thread Thierry FOURNIER
On Sun, 01 Mar 2015 17:34:36 +0100 Aleksandar Lazic al-hapr...@none.at wrote: Dear Thierry. Cool work ;-) Am 01-03-2015 13:47, schrieb Thierry FOURNIER: Hi everyone, Thanks Willy for the introduction. I join the first part of the document. All the function are not yet

Re: Lua patchset merged

2015-03-02 Thread Thierry FOURNIER
On Sun, 01 Mar 2015 23:45:01 +0100 Cyril Bonté cyril.bo...@free.fr wrote: Hi again Thierry, Le 01/03/2015 18:22, Cyril Bonté a écrit : I think I'll try some LUA scripts before the end of the week-end (which is approaching too quickly) ;-) OK, I could play with some Lua scripts. I

Re: Lua patchset merged

2015-03-02 Thread Thierry FOURNIER
On Sun, 1 Mar 2015 23:20:14 +0100 Baptiste bed...@gmail.com wrote: how do you pass arguments to a lua function? Imagine I want to call the following lua function: function download (host, file) If you ask about argument between HAProxy configuration file and Lua function, I assume than my

Re: Lua patchset merged

2015-03-02 Thread Aleksandar Lazic
Am 02-03-2015 14:51, schrieb Thierry FOURNIER: On Sun, 01 Mar 2015 17:34:36 +0100 Aleksandar Lazic al-hapr...@none.at wrote: [snipp] Maybe it would be possible to integrate lua-scripting into the check agent framework? Hi, thank you. It is certainly possible. Have you some concrete

Re: Lua patchset merged

2015-03-01 Thread Baptiste
how do you pass arguments to a lua function? Imagine I want to call the following lua function: function download (host, file) Baptiste

Re: Lua patchset merged

2015-03-01 Thread Cyril Bonté
Hi again Thierry, Le 01/03/2015 18:22, Cyril Bonté a écrit : I think I'll try some LUA scripts before the end of the week-end (which is approaching too quickly) ;-) OK, I could play with some Lua scripts. I could declare some custom sample fetches, from which I could call internal fetches

Re: Lua patchset merged

2015-03-01 Thread Thierry FOURNIER
Hi everyone, Thanks Willy for the introduction. I join the first part of the document. All the function are not yet available. The doc uses a markdown format like that uses GitHub. I join the original format, and the HTML conversion. The next steps are: - collecting users ideas and bug

Re: Lua patchset merged

2015-03-01 Thread Aleksandar Lazic
Dear Thierry. Cool work ;-) Am 01-03-2015 13:47, schrieb Thierry FOURNIER: Hi everyone, Thanks Willy for the introduction. I join the first part of the document. All the function are not yet available. The doc uses a markdown format like that uses GitHub. I join the original format, and the

Re: Lua patchset merged

2015-03-01 Thread Baptiste
Great news, congratulation Thierry! Baptiste

Re: Lua patchset merged

2015-03-01 Thread Cyril Bonté
Hi Tierry, Huge work ! I've not played with it yet, but I've already compiled it successfully ;-) Some early feedbacks : - It appears that the code requires at least LUA 5.2. - Maybe we'll have to work on the Makefile to ease the compilation. For example, on debian, I have to add -llua5.2

Re: Lua patchset merged

2015-03-01 Thread Baptiste
A few ifdef missing when SSL is not compiled in HAProxy: diff --git a/src/hlua.c b/src/hlua.c index a0e4d91..3d69c5d 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1542,6 +1542,7 @@ __LJMP static int hlua_socket_connect(struct lua_State *L) return 0; } +#ifdef USE_OPENSSL __LJMP static