summaryrefslogtreecommitdiff
path: root/admin
Commit message (Collapse)AuthorAgeFilesLines
* MINOR: acme.sh: add the deploy script for acme.sh in admin directoryWilliam Lallemand2023-04-263-0/+1061
| | | | | Add the acme.sh deploy script for haproxy in the admin directory so users can have an official download source.
* BUILD: halog: fix missing double-quote at end of help lineWilly Tarreau2022-11-251-3/+3
| | | | | | | This will tell me to change the line format after testing :-( This was introduced with commit 286199c24 ("DOC: halog: explain how to use -ac and -ad in the help message"), no backport is needed unless it's backported as well.
* DOC: halog: explain how to use -ac and -ad in the help messageWilly Tarreau2022-11-251-0/+5
| | | | | | | | Tim reported in issue #1435 that halog options -ac/-ad were poorly documented. They're indeed used to spot infrastructure outages between the clients and haproxy by detecting abnormal periods of silence followed by bursts, either affecting the network itself, or also a single machine (e.g. swapping on an edge client or proxy can cause such patterns).
* CLEANUP: assorted typo fixes in the code and commentsIlya Shipitsin2022-10-301-1/+1
| | | | This is 32nd iteration of typo fixes
* BUILD: halog: fix some incorrect signs in printf formats for integersWilly Tarreau2022-04-122-8/+8
| | | | | | In issue #1184, cppcheck found several issues in the printf formats used to display integers, some of which are unsigned but which used to still rely on "%d".
* OPTIM: halog: skip fields 64 bits at a time when supportedWilly Tarreau2021-11-081-0/+32
| | | | | | | | | Some architectures like x86_64 and aarch64 support efficient unaligned 64-bit reads. On such architectures, we already know that each string passed to field_start() has some margin at the end because it's parsed using fgets2() which looks for the trailing LF using the same method. Thus let's skip spaces by packs of 8. This increases the parsing speed by 35%.
* OPTIM: halog: improve field parser speed for modern compilersWilly Tarreau2021-11-081-8/+4
| | | | | | | | Modern compilers were producing producing less efficient code in the field_start() loop, by not emitting two conditional jumps for a single test. However by reordering the test we can merge the optimal case and the default one and get back to good performance so let's simplify the test. This improves the parsing speed by 5%.
* CLEANUP: halog: remove unused strl2ui()Willy Tarreau2021-11-081-16/+0
| | | | | strl2ui() isn't used anymore in the code, likely because str2ic() is often used instead. Let's drop it.
* CLEANUP: halog: make the default usage message fit in small screensWilly Tarreau2021-11-081-9/+10
| | | | | | | The usage message was starting to have long lines, it's preferable that it still fits well into a default 80-col display so that options are easy to find. Also cut that into the 3 parts (input filter, modifier, output format) for improved legibility.
* CLEANUP: halog: Remove dead storesTim Duesterhus2021-11-051-3/+3
| | | | Found using clang's scan-build.
* MINOR: halog: Add support for extracting captures using -hdrTim Duesterhus2021-10-281-4/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for extracting captured header fields to halog. A field can be extracted by passing the `-hdr <block>:<field>` output filter. Both `<block>` and `<field>` are 1-indexed. `<block>` refers to the index of the brace-delimited list of headers. If both request and response headers are captured, then request headers are referenced by `<block> = 1`, response headers are `2`. If only one direction is captured, there will only be a single block `1`. `<field>` refers to a single field within the selected block. The output will contain one line, possibly empty, per log line processed. Passing a non-existent `<block>` or `<field>` will result in an empty line. Example: capture request header a len 50 capture request header b len 50 capture request header c len 50 capture response header d len 50 capture response header e len 50 capture response header f len 50 `-srv 1:1` will extract request header `a` `-srv 1:2` will extract request header `b` `-srv 1:3` will extract request header `c` `-srv 2:3` will extract response header `f` This resolves GitHub issue #1146.
* BUG/MINOR: halog: Add missing newlines in die() messagesTim Duesterhus2021-10-281-10/+10
| | | | This newline is required to correctly print the usage.
* CLEANUP: halog: Use consistent indentation in help()Tim Duesterhus2021-10-281-4/+4
| | | | Consistently use 1 Tab per line.
* MINOR: halog: Rename -qry to -queryTim Duesterhus2021-10-281-3/+3
| | | | | With the query flag moved into the correct help section, there is enough space for two additional characters.
* DOC: halog: Move the `-qry` parameter into the correct section in help textTim Duesterhus2021-10-281-2/+2
| | | | | | | This is not an output filter, but instead a modifier. Specifically "only one may be used at a time" is not true. see 24b8d693b202b01b649f64ed878d8f9dd1b242e4
* MINOR: halog: Add -qry parameter allowing to preserve the query string in -uXTim Duesterhus2021-10-281-4/+9
| | | | | | Our use-case for this is a dynamic application that performs routing based on the query string. Without this option all URLs will just point to the central entrypoint of this location, making the output completely useless.
* BUILD: halog: fix a -Wundef warning on non-glibc systemsWilly Tarreau2021-09-131-1/+1
| | | | | | | | | Dmitry reported this warning on FreeBSD since the introduction of -Wundef: admin/halog/fgets2.c:38:30: warning: '__GLIBC__' is not defined, evaluates to 0 [-Wundef] #if defined(__x86_64__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 15)) ^ A defined() was missing.
* CLEANUP: Add haproxy/xxhash.h to avoid modifying import/xxhash.hTim Duesterhus2021-09-111-1/+2
| | | | | | | This solves setting XXH_INLINE_ALL in a cleaner way, because the imported header is not modified, easing future updates. see 6f7cc11e6dd0f01b437fba893da2edd2362660a2
* MINOR: systemd: remove the ExecStartPre line in the unit fileWilliam Lallemand2021-08-201-1/+0
| | | | | | | | | | | | The ExecStartPre line was introduced a long time ago in the systemd unit file, at the time of systemd wrapper. With the haproxy master worker mode, this line is now useless, since starting haproxy itself will check the configuration. However this does not concern the check in the ExecReload which is still needed to return a reload status to HAProxy. It probably shouldn't be backported.
* BUG/MINOR: systemd: ExecStartPre must use -WsWilliam Lallemand2021-08-201-1/+1
| | | | | | | | This line should disappear in a future version but we should still fix ExecStartPre with -Ws like we've done in 9def142. It's a complementary fix that must be backported with 9def142 ("BUG/MINOR: systemd: must check the configuration using -Ws").
* ADMIN: dyncookie: implement a simple dynamic cookie calculatorWilly Tarreau2021-08-111-0/+55
| | | | | This utility can be useful to figure what cookie value a server will have based on the secret, its IP and its port.
* BUG/MINOR: systemd: must check the configuration using -WsWilliam Lallemand2021-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | When doing a reload with a configuration which requires the master-worker mode, the configuration check will fail because the check is not done with -W/-Ws. Example: wla@kikyo:~/haproxy$ ./haproxy -Ws -c -f haproxy.cfg Configuration file is valid wla@kikyo:~/haproxy$ ./haproxy -c -f haproxy.cfg [NOTICE] (13153) : haproxy version is 2.5-dev2-4567b3-16 [NOTICE] (13153) : path to executable is ./haproxy [ALERT] (13153) : config : Can't use a 'program' section without master worker mode. [ALERT] (13153) : config : Fatal errors found in configuration. This patch fixes the issue by adding -Ws on the check command line. Must be backported in all stable branches. (The file was previously in contrib/systemd/haproxy.service.in).
* MAJOR: config: remove parsing of the global "nbproc" directiveWilly Tarreau2021-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This one was deprecated in 2.3 and marked for removal in 2.5. It suffers too many limitations compared to threads, and prevents some improvements from being engaged. Instead of a bypassable startup error, there is now a hard error. The parsing code was removed, and very few obvious cases were as well. The code is deeply rooted at certain places (e.g. "for" loops iterating from 0 to nbproc) so it will not be that trivial to remove everywhere. The "bind" and "bind-process" parsers will have to be adjusted, though maybe not completely changed if we later want to support thread groups for large NUMA machines. Some stats socket restrictions were removed, and the doc was updated according to what was done. A few places in the doc still refer to nbproc and will have to be revisited. The master-worker code also refers to the process number to distinguish between master and workers and will have to be carefully adjusted. The MAX_PROCS macro was reset to 1, this will at least reduce the size of some remaining arrays. Two regtests were dependieng on this directive, one with an explicit "nbproc 1" and another one testing the master's CLI using nbproc 4. Both were adapted.
* MEDIUM: proxy: remove the deprecated "grace" keywordWilly Tarreau2021-06-111-1/+1
| | | | | | | | | Commit ab0a5192a ("MEDIUM: config: mark "grace" as deprecated") marked the "grace" keyword as deprecated in 2.3, tentative removal for 2.4 with a hard deadline in 2.5, so let's remove it and return an error now. This old and outdated feature was incompatible with soft-stop, reload and socket transfers, and keeping it forced ugly hacks in the lower layers of the protocol stack.
* DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and commentsWilly Tarreau2021-05-091-1/+1
| | | | | | | | Some of the Lua doc and a few places still used "Haproxy" or "HAproxy". There was even one "HA proxy". A few of them were in an example of VTest output, indicating that VTest ought to be fixed as well. No big deal but better address all the remaining ones so that these inconsistencies stop spreading around.
* ADMIN: netsnmp: report "HAProxy" and not "Haproxy" in output descriptionsWilly Tarreau2021-05-095-12/+12
| | | | | In the SNMP fields descriptions, "Haproxy" was mentioned, let's make it consistent with the rest.
* MINOR: freq_ctr: unify freq_ctr and freq_ctr_period into freq_ctrWilly Tarreau2021-04-111-1/+1
| | | | | | | | | Both structures are identical except the name of the field starting the period and its description. Let's call them all freq_ctr and the period's start "curr_tick" which is generic. This is only a temporary change and fields are expected to remain the same with no code change (verified).
* BUILD: makefile: build halog with the correct flagsWilly Tarreau2021-04-022-22/+4
| | | | | | | halog currently emits lots of warnings because it does not benefit from the default flags. Let's update the main makefile to build it by itself and remove the other one. The sub-project's makefile was replaced with A readme indicating how to build it.
* ADMIN: halog: automatically enable USE_MEMCHR on the right glibc versionWilly Tarreau2021-04-021-0/+5
| | | | | | | | | | | | There has been a USE_MEMCHR option for ages that was mostly never enabled because it was unclear when glibc became faster. A quick look at the code indicates that this arrived with the SSE implementation of memchr() which arrived at commit 093ecf92998de2 between 2.14 and 2.15, so let's automatically turn this on on x86_64 with glibc >= 2.15. This results in ~6GB of logs read per second (20 million lines) and ~2.5GB/s (8 million lines) parsed for errors or status codes classification, or 1 GB/s (3 million lines) for time percentiles.
* CONTRIB: move halog to admin/Willy Tarreau2021-04-023-0/+2075
| | | | | halog is an admin tool, so let's move it to admin/ as well. The makefile was updated to build from the new directory.
* CONTRIB: move some admin-related sub-projects to admin/Willy Tarreau2021-04-0223-0/+5325
The following components were moved to admin/ because they're generally used in field by admins: iprange/ netsnmp-perl/ selinux/ systemd/ wireshark-dissectors/ syntax-highlight/ release-estimator/