Commit 6a06da4
committed
BUG/MEDIUM: Fix relative path of haproxy files.
We want to use the haproxy config dir (where haproxy.cfg is located)
as a base directory when loading files with relative path.
This is mandatory the PatternFiles feature to work.
For example if user provides "patterns/ips" as a patternfile and
haproxy.cfg is in "/tmp/haproxy" then it will load the file from
"/tmp/haproxy/patterns/ips".
We used to do this by starting haproxy process from the config dir
because by default relative path are loaded from the location the
process is started in.
But since introduction of s6 system the starting location of the haproxy
process has changed breaking patternfiles.
One possible fix was to force s6 to start haproxy from the config dir,
however a more proper solution is to use the "default-path" keyword
added in haproxy 2.4 to conigure this behavior. Which what was done in
this fix. Also this resulted in the requirement of making the TransactionDir
(for ClientNative) point to the config dir otherwise configuration
checks would fail.1 parent 26c532b commit 6a06da4
File tree
3 files changed
+2
-6
lines changed- controller
- configuration
- fs/usr/local/etc/haproxy
3 files changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
176 | 175 | | |
177 | 176 | | |
178 | 177 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 178 | | |
183 | 179 | | |
184 | 180 | | |
| |||
188 | 184 | | |
189 | 185 | | |
190 | 186 | | |
191 | | - | |
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments