Re: BUG: Lua tasks can't use client sockets after bf89ff3d

2018-11-29 Thread Adis Nezirovic
sually suffers trying to do things in tasks, I don't think this is the first time something gets broken. Can we make reg test with Lua script (maybe strip out LuaSocket requirement)? Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Sui

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-09-27 Thread Adis Nezirovic
On Thu, Sep 27, 2018 at 04:52:29PM +0200, Thierry Fournier wrote: > I Adis, > > Sorry for the delay, I processed a quick review, and all seems to be ok for > me! > > BR, > Thierry Great, happy to hear that, I hope guys will merge it soon. Best regards, Adis

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-09-27 Thread Adis Nezirovic
On Mon, Sep 03, 2018 at 12:09:47PM +0200, Adis Nezirovic wrote: > Hi Thierry, > > Have you had the time to review my patches? Thierry, Reviving this thread, do you have any objections about latest version of the patch (Lua stick table patch) Best regards, Adis

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-09-03 Thread Adis Nezirovic
On Fri, Aug 24, 2018 at 11:40:51PM +0200, Adis Nezirovic wrote: > Thierry, > > Something for Monday :-) > > Latest version of the patch in attachment: > > - Filter table format is flattened/simplified > - I've tried to address filter table format error messages > (w

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-24 Thread Adis Nezirovic
t;From 6b702ff6f12f919ba4d2f42a7962fa2345272382 Mon Sep 17 00:00:00 2001 From: Adis Nezirovic Date: Fri, 13 Jul 2018 12:18:33 +0200 Subject: [PATCH] MEDIUM: lua: Add stick table support for Lua. This ads support for accessing stick tables from Lua. The supported operations are reading general table info, lookup by string/

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-23 Thread Adis Nezirovic
On Thu, Aug 23, 2018 at 03:43:59PM +0200, Willy Tarreau wrote: > Does this mean I should merge Adis' patch or do you want to verify > other things ? Just let me know. Willy, I'll submit new patch later today with simplified filter definitions and then we can ask Thierry for final ack for the

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-21 Thread Adis Nezirovic
ive to the current > "n", can disappear and the ebmb_next() can return wrong memory. I was under impression that we only have to acquire lock and increment ref_cnt (so we can be sure our current node n is not deleted) ebmb_next() is called only when we're holding lock, first and every other

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-20 Thread Adis Nezirovic
On Mon, Aug 20, 2018 at 02:11:13PM +0200, Adis Nezirovic wrote: > Hi guys, > > I've attached a patch to add stick table support to Lua. Operations are > mostly similar to "show table" functionality from admin socket, namely: > > - Show basic table info > - Key lo

[PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-20 Thread Adis Nezirovic
on Sep 17 00:00:00 2001 From: Adis Nezirovic Date: Fri, 13 Jul 2018 12:18:33 +0200 Subject: [PATCH] MEDIUM: lua: Add stick table support for Lua (read-only ops). --- doc/lua-api/index.rst | 46 + include/types/hlua.h | 1 + src/hlua_fcn.c| 401

Re: JWT payloads break b64dec convertor

2018-05-28 Thread Adis Nezirovic
On 05/26/2018 04:27 PM, Jonathan Matthews wrote: > Hello folks, > > The payload (and other parts) of a JSON Web Token (JWT, a popular and > growing auth standard: https://tools.ietf.org/html/rfc7519) is base64 > encoded. > > Unfortunately, the payload encoding (specified in >

Re: lua socket api settimeout in seconds vs. milliseconds

2017-11-08 Thread Adis Nezirovic
On 11/07/2017 08:49 PM, Nick Galbreath wrote: > I have a question regarding the socket:settimeout function. > > It appears to only accept an integer value for seconds, but internally > converts to milliseconds (see below). > > Is there a reason to enforce whole seconds, or could this be relaxed

Re: Possible bug in task_wakeup() impacts Lua tasks

2017-10-18 Thread Adis Nezirovic
On 10/17/2017 07:05 PM, Emeric Brun wrote: > Hi Adis, > > This patch should fix the issue more consistently. > > Could you confirm? It seems to work fine here, for the trivial test task and other stuff I work with. Thanks! Best regards, Adis

Possible bug in task_wakeup() impacts Lua tasks

2017-10-17 Thread Adis Nezirovic
Hello guys, After this commit: commit 0194897e540cec67d7d1e9281648b70efe403f08 Author: Emeric Brun Date: Thu Mar 30 15:37:25 2017 +0200 MAJOR: task: task scheduler rework. basic Lua tasks don't work anymore. e.g. this only gets called once: function cron()

[PATCH] Fix-bitwise-logic-for-hlua_server_check*

2017-07-26 Thread Adis Nezirovic
Hello guys, Here is a fix for bug in hlua_server_check_enable()/hlua_server_check_disable, the bitwise logic in the code was inverted. This can be applied to 1.7 too. Best regards, Adis >From b51318ab44cb904f9689aebe27f61a41a26240cc Mon Sep 17 00:00:00 2001 From: Adis Nezirovic <a

Re: BUG: Lua service timeouts while sending data (after 0194897e540cec67d7d1e9281648b70efe403f08)

2017-07-24 Thread Adis Nezirovic
On 07/24/2017 06:36 PM, Willy Tarreau wrote: > Hehe I've just committed the fixes a few minutes ago :-) We'had quite a > long head scratching session with Thierry, Christopher and Emeric on > this one. It's sometimes impressive how some sleeping bugs can patiently > wait for a subtle change to

BUG: Lua service timeouts while sending data (after 0194897e540cec67d7d1e9281648b70efe403f08)

2017-07-24 Thread Adis Nezirovic
Hello guys, I've noticed that a Lua service timeouts in DATA phase, for outputs equal or bigger than 8k (approx). After the timeout (timeout client), it returns the full response. (Termination state is cD--) I've attached the minimal configuration and a Lua script to trigger the problem. You

Re: [PATCH] Support proxies with identical names in Lua core.proxies

2017-07-24 Thread Adis Nezirovic
On 07/24/2017 01:30 PM, Thierry FOURNIER wrote: > I think that the most reliable way is adding anoter tree. We keep the > "proxies" tree base with existing, and we add two trees "frontends" and > "backends" which contains respecticely the list of frontends and > backends. This would work for me

Re: [PATCH] Support proxies with identical names in Lua core.proxies

2017-07-20 Thread Adis Nezirovic
On 07/20/2017 02:55 PM, Willy Tarreau wrote: > So you can have : > 0 or 1 "listen" > 0 or 1 "frontend" + 0 or 1 "backend" > > Just a few ideas come to my mind : > - is it possible to store arrays into arrays ? I mean, could we have > for example core.proxies["foo"].side[FRONT|BACK]

Re: [PATCH] Support proxies with identical names in Lua core.proxies

2017-07-20 Thread Adis Nezirovic
On 07/20/2017 12:17 PM, Thierry FOURNIER wrote: > I understand the problem, but I can't accept this patch because it makes > the proxies list unusable. Your patch remove the proxies names, and the > user cannot have solution for knowning the real name of the proxies > now called 1, 2, 3, ... > >

[PATCH] Support proxies with identical names in Lua core.proxies

2017-06-05 Thread Adis Nezirovic
Hi guys, While playing with Lua API I've noticed that core.proxies attribute doesn't return all the proxies, more precisely the ones with same names (e.g. for frontend and backend with the same name it would only return the latter one). Here is a patch which tries to fix that, avoiding using the