[PATCH] Fix dumping of stick table entries for k/v pairs.

2020-05-05 Thread Adis Nezirovic
ize 1k stick on src Best regards, Adis -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com >From fe8c56ea3b9f34a7664d469f0bee0c69a3939bd7 Mon Sep 17 00:00:00 20

Re: [PATCH] Fix dumping of stick table entries for k/v pairs.

2020-05-07 Thread Adis Nezirovic
Hello guys, any comments on the patch? Bump, adding Thierry to the conversation. Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com

Re: [PATCH] Fix dumping of stick table entries for k/v pairs.

2020-05-07 Thread Adis Nezirovic
, it should probably be tagged 'BUG/MEDIUM' instead of 'MEDIUM' This one too, it is clearly a bug which causes user script in Lua to fail during StickTable:dump() (and similar) Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 T

Re: [PATCH 0/6] Lua variable handling

2020-05-19 Thread Adis Nezirovic
variable is never used or set in the rest of the config, we would know that. Additionally, one can set "zero-warning" option to prevent abuse by Lua scripts or to prevent bugs. For your use case, maybe you could use maps from Lua? They should be backed by ebtree and be faster right?

Re: Several CVEs in Lua 5.4

2020-07-29 Thread Adis Nezirovic
On 7/29/20 11:16 AM, Froehlich, Dominik wrote: Hi Lukas, Thanks for the reply. My query goes along the lines of which Lua version is compatible with HAproxy and contains fixes to those CVEs. I could not find a specific instruction as to which Lua version can be used to build HAproxy / has been

set-path impact on ACL eval and on set-var

2020-10-14 Thread Adis Nezirovic
;b" http-request set-var(txn.b) path,field(5,/) if is_b # Case 1, we can't see b value if we set-path here # http-request set-path /x/y/z http-request set-query "a=%[var(txn.a)]" if !is_b http-request set-query "a=%[var(txn.a)]&b=%[var(txn.b)]" if is

Re: Count uniq Client ips

2020-10-15 Thread Adis Nezirovic
need to look out for performance, added latency etc, but it would be a start. You can then access Redis outside of the HAProxy context and observe the counters. Just my 2c, hope it helps you (like you helped many people on this list) Best regards, -- Adis Nezirovic Software Engineer HAProxy Technolo

Re: do we want to keep CentOS 6 builds?

2020-12-02 Thread Adis Nezirovic
eople from setting up a backup server in emergency. So does this mean we'll drop this one ? For what it's worth, after EOL, data is moved to CentOS vault: https://vault.centos.org/6.10/ Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime!

[PATCH] BUG/MEDIUM: stats: Add missing INF_BUILD_INFO definition

2021-01-14 Thread Adis Nezirovic
build_info I've attached a trivial patch which fixes the issue (I simply add missing definitions, but build info is hardcoded to 1, since I don't know where should I get that from). Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 T

Re: [PATCH v2] BUG/MEDIUM: stats: add missing INF_BUILD_INFO definition

2021-01-15 Thread Adis Nezirovic
me time to contribute a few basic Lua tests, so things get noted faster). Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com

Re: Logging down output from the a Lua script

2021-03-04 Thread Adis Nezirovic
. If you use Lua for action or service (i.e. you have txn object readily available in the script), you can use txn:set_var(name, value) to communicate stuff back to regular HAProxy layer, and then log the value of the variable with rest of the stuff. Best regards, -- Adis Nezirovic Software

Re: Logging down output from the a Lua script

2021-03-05 Thread Adis Nezirovic
n', while services expose full 'applet' object, so I do think it works as intended, it's not an accident. You are using Lua service for redirection? Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite

Re: HAPROXY CAN NOT POINT IN TO PORT 5000 OF PATRONI

2021-04-22 Thread Adis Nezirovic
l (patroni) provided haproxy configuration and check if the backend servers are up. (i.e. open the "stats" frontend endpoint in your browser). Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02

Re: Error "line too long" after adding some conditions

2021-05-11 Thread Adis Nezirovic
st block can also be expressed as: acl evil path_beg /evil/ acl evil path_end /evil http-request deny if evil " Example from our blog post: https://www.haproxy.com/blog/introduction-to-haproxy-acls/ Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 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

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, ... > > I

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] where

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 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 mig

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 join

[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 Date: Wed,

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() while true do

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

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 t

[PATCH] BUG/MINOR: Missing stat_field_names (since f21d17bb)

2019-09-13 Thread Adis Nezirovic
hits,(null),(null), The attached patch solves the issue. Best regards -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com >From 807d0285c4b2e436284219d99e3e8d6c5e2be004

Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-26 Thread Adis Nezirovic
and values would be either "string" or array in case of multiple header values (we can fold multiple values easily with Lua)... Just my 2c. Best regards, -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com

Re: [PATCH] MINOR: lua: Add lua-prepend-path configuration option

2020-01-09 Thread Adis Nezirovic
, and they can override configuration or Lua path settings. IMO, we don't need another directive in HAProxy just to set Lua paths. Best regards -- Adis Nezirovic Software Engineer HAProxy Technologies - Powering your uptime! 375 Totten Pond Road, Suite 302 | Waltham, MA 02451, US +1 (844) 222-4340 | https://www.haproxy.com

[PATCH] MEDIUM: cli: Allow multiple filter entries for show table

2020-01-22 Thread Adis Nezirovic
also be improved (we don't show which filter entry is wrong, if we have more than one), but I wanted to first check with you guys if we can add "snprintf" style error function to the cli, in addition to existing cli_dynerr()/cli_dynmsg() Best regards, -- Adis Nezirovic Softwa

Re: [PATCH] MEDIUM: cli: Allow multiple filter entries for show table

2020-01-22 Thread Adis Nezirovic
Hello, Here it is, I've introduced a bug in last patch (since it is recent I've put "MINOR", even if it might have bigger impact in prod. Also, a patch for better error diagnostics, and to report any extra data in the filter. Best regards, -- Adis Nezirovic Softw

Re: [PATCH] MEDIUM: cli: Allow multiple filter entries for show table

2020-01-23 Thread Adis Nezirovic
cts are not obvious from this one-liner : Here is me doing my best, selling you the good stuff, and the reason to backport the whole feature (so we can detect the multi-filter from CLI, and not rely on haproxy version or similar), see the attached patch. Best regards, Adis -- Adis Nezirovic Softw

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 > https://tools.ietf.o

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

2018-08-20 Thread Adis Nezirovic
3e31c21e 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 (read-only ops). --- doc/lua-api/index.rst | 46 + include/types/hlua.h | 1 + src/hlua_fcn.c| 401 ++

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 > - K

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

2018-08-21 Thread Adis Nezirovic
.431: Your release the lock, so the next element relative 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()

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 patc

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

2018-08-24 Thread Adis Nezirovic
s, Adis >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 st

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 >

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-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: BUG: Lua tasks can't use client sockets after bf89ff3d

2018-11-29 Thread Adis Nezirovic
P.S. Lua usually 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