[PATCH 1/1] DOC: Add GitHub issue config.yml
This allows us to link to the mailing list and forum within the issue tracker, hopefully discouraging users to ask questions even more. see https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser --- .github/ISSUE_TEMPLATE/config.yml | 8 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0..4c1ddc604 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: HAProxy Mailing List +url: https://www.mail-archive.com/haproxy@formilux.org/ +about: Questions are best directed to HAProxy Mailing list or the HAProxy Forum. + - name: HAProxy Forum +url: https://discourse.haproxy.org/ +about: Questions are best directed to HAProxy Mailing list or the HAProxy Forum. -- 2.23.0
[PATCH 0/1] Add GitHub issue config.yml
Willy, Lukas, GitHub now allows us to link to arbitrary locations within the issue template selector. This is a good opportunity to link to the mailing list and Discourse. I opted to not remove the Question.md template and I left the blank template enabled. The latter is a fairly small link, thus hopefully ignored by the users and appears to be useful for the developer team with the development notes issues. A preview can be found here: https://github.com/TimWolla/haproxy/issues/new/choose Best regards Tim Duesterhus (1): DOC: Add GitHub issue config.yml .github/ISSUE_TEMPLATE/config.yml | 8 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml -- 2.23.0
Re: [PR] MINOR: stick-table: allow sc-set-gpt0 to set value from an expression
Hi Cédric, On Fri, Nov 01, 2019 at 10:23:14AM -0400, PR Bot wrote: >Hello HAProxy team! >While working on a use-case we have at hand, we ended up desperately >needing the ability to set GPT0 from a dynamic value. This patch is >mostly copy-paste from the `set-var()` action. I think your proposal totally makes sense. It would be nice to mention in the doc that gpt0 is only 32-bit wide. I'm having one small doubt about this part: + /* Check the sample data type. */ + if (smp.data.type != SMP_T_SINT) { + send_log(px, LOG_WARNING, "stick table: invalid data type while fetching expression."); + if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) + ha_alert("stick table: invalid data type while fetching expression.\n"); + return 0; + } Usually we don't error on type issues, instead we try to cast the result as best as we can. This is particularly important with HTTP processing since most of the contents are text-based, thus you could extract a numeric field from a query string argument, which would be returned as a string, and expect it to be automatically converted instead of returning an error. Please have a look at the end of sample_fetch_as_type() to see how to proceed. Personally I think that we would benefit from a variant of sample_expr() which would take an output type and would automatically perform the conversion to this type. But it's not that often that we need it anyway. Last point regarding your last patch to adjust the coding style, please remerge it with your first patch (if you're unsure how to proceed, use "git rebase -i master" for this, then use the "fixup" operation for the second one instead of "pick", and it will be fused into it). Thanks! Willy
[PR] MINOR: stick-table: allow sc-set-gpt0 to set value from an expression
Dear list! Author: Cédric Dufour Number of patches: 2 This is an automated relay of the Github pull request: MINOR: stick-table: allow sc-set-gpt0 to set value from an expression Patch title(s): MINOR: stick-table: allow sc-set-gpt0 to set value from an expression coding style (should have been in my previous commit) Link: https://github.com/haproxy/haproxy/pull/354 Edit locally: wget https://github.com/haproxy/haproxy/pull/354.patch && vi 354.patch Apply locally: curl https://github.com/haproxy/haproxy/pull/354.patch | git am - Description: Allow the `sc-set-gpt0()` action to set GPT0 to a value dynamically evaluated from its `` argument (in addition to the existing static `` alternative). Hello HAProxy team! While working on a use-case we have at hand, we ended up desperately needing the ability to set GPT0 from a dynamic value. This patch is mostly copy-paste from the `set-var()` action. Looking forwards to your review and best, Cédric Instructions: This github pull request will be closed automatically; patch should be reviewed on the haproxy mailing list (haproxy@formilux.org). Everyone is invited to comment, even the patch's author. Please keep the author and list CCed in replies. Please note that in absence of any response this pull request will be lost.
Re: Haproxy only tracking at maximum 3 keys for api-key based tracking
Hello On 11/1/19 2:03 AM, Victor Jonathon Calel wrote: backend sec_table stick-table type string len 64 size 500k expire 5s store gpc0,gpt0,http_req_rate(1s) backend min_table stick-table type string len 64 size 500k expire 5s store http_req_rate(60s) As you can see triad03 matching 5 keys. And requests is coming from all 5 keys, but stick-table only shows 3 keys in it (First, second and 4rth). watch -n1 'echo "show table sec_table" | socat stdio unix:/var/run/haproxy.sock' # table: sec_table, type: string, size:512000, used:3 Why is that? Does this have anything to do with MAX_SESS_STCKTR ? Bur here I am only using two counter sc0 and sc1. What am I doing wrong? Please help. I have tested this config and it seems to work fine for me on the latest stable version. # table: sec_table, type: string, size:512000, used:5 Are you sure the entries are not expiring? It seems your expiration time is set to 5 seconds. Thanks, -- Daniel
Haproxy only tracking at maximum 3 keys for api-key based tracking
Hi, We are using HAproxy 1.8.8-1ubuntu0.4 for key based tracking on Ubuntu 18.04. The client is sending api-key in request header (Ex. curl -H "api-key: 56365443625"). However stick table only showing 3 keys. The conf is something like that global log /dev/loglocal0 log /dev/loglocal1 notice chroot /var/lib/haproxy stats socket /var/run/haproxy.sock mode 666 level admin expose-fd listeners defaults log global modehttp frontend http_front bind *:80 bind *:443 ssl crt /etc/ssl/private/cert1.pem redirect scheme https if !{ ssl_fc } option forwardfor acl triad03 hdr_dom(api-key) -i 0704b6c e494126cd3 7ea36ea8b027c 7ffd0690a40 d700c45 acl triad06 hdr_dom(api-key) -i 070erferc d660089d 787bh009 89089dd sd8678s78d6 #Load Balacing Global acl has_auth_header req.fhdr(api-key) -m found http-request track-sc0 req.hdr(api-key) table sec_table if triad03 has_auth_header http-request track-sc1 req.hdr(api-key) table min_table if triad03 has_auth_header capture request header api-key len 64 backend default balance roundrobin server dev-05 105.202.106.147:80 check server dev-06 105.201.69.36:80 check backend sec_table stick-table type string len 64 size 500k expire 5s store gpc0,gpt0,http_req_rate(1s) backend min_table stick-table type string len 64 size 500k expire 5s store http_req_rate(60s) As you can see triad03 matching 5 keys. And requests is coming from all 5 keys, but stick-table only shows 3 keys in it (First, second and 4rth). watch -n1 'echo "show table sec_table" | socat stdio unix:/var/run/haproxy.sock' # table: sec_table, type: string, size:512000, used:3 Why is that? Does this have anything to do with MAX_SESS_STCKTR ? Bur here I am only using two counter sc0 and sc1. What am I doing wrong? Please help. Thank You, Victor John