Zlatko Bratkovic
d05e5855d0
BUG/MINOR: properly pass option to underline function
3 months ago
Zlatko Bratkovic
d79bf18a3b
MINOR: add option to allow delay starting runtime
...
added AllowDelayedStartMax and AllowDelayedStartTick
to check allow slower starting of HAProxy, useful on limited machines.
these can be accessed with runtimeOptions.AllowDelayedStart(max, tick)
3 months ago
Zlatko Bratkovic
d3babf0d31
MINOR: add option to ignore socket failures on start
...
this add option to start HAProxy later
3 months ago
Helene Durand
468a446249
MAJOR: upgrade client-native to v6
4 months ago
Abhijeet Rastogi
76f1109485
MINOR: mock: add locks to avoid data race
...
Multiple goroutines manage the state of `running` and `responses`, locks
should be used to avoid data race.
Sample data race:-
```
=== RUN TestSingleRuntime_DeleteCrtListEntry
=== RUN TestSingleRuntime_DeleteCrtListEntry/delete_crt-list_entries_of_crt-list,_should_return_no_error
=== RUN TestSingleRuntime_DeleteCrtListEntry/delete_crt-list_entries_of_crt-list,_should_return_no_error#01
==================
WARNING: DATA RACE
Write at 0x00c000372648 by goroutine 13:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).SetResponses()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:58 +0x9c
github.com/haproxytech/client-native/v5/runtime.TestSingleRuntime_DeleteCrtListEntry.func1()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/crt-lists_test.go:413 +0x4a
testing.tRunner()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1595 +0x238
testing.(*T).Run.func1()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x44
Previous read at 0x00c000372648 by goroutine 11:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).handleConnection.func1()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:84 +0x53d
Goroutine 13 (running) created at:
testing.(*T).Run()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x82a
github.com/haproxytech/client-native/v5/runtime.TestSingleRuntime_DeleteCrtListEntry()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/crt-lists_test.go:412 +0x365
testing.tRunner()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1595 +0x238
testing.(*T).Run.func1()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x44
Goroutine 11 (finished) created at:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).handleConnection()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:62 +0xe4
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).Start.func1()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:51 +0x36
==================
testing.go:1465: race detected during execution of test
==================
WARNING: DATA RACE
Write at 0x00c000372640 by goroutine 7:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).Stop()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:35 +0x2f
github.com/haproxytech/client-native/v5/runtime.TestSingleRuntime_DeleteCrtListEntry.func2()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/crt-lists_test.go:362 +0x33
runtime.deferreturn()
/usr/local/Cellar/go/1.21.2/libexec/src/runtime/panic.go:477 +0x30
testing.tRunner()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1595 +0x238
testing.(*T).Run.func1()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x44
Previous read at 0x00c000372640 by goroutine 8:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).Start.func1()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:43 +0x49
Goroutine 7 (running) created at:
testing.(*T).Run()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x82a
testing.runTests.func1()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:2054 +0x84
testing.tRunner()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1595 +0x238
testing.runTests()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:2052 +0x896
testing.(*M).Run()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1925 +0xb57
main.main()
_testmain.go:91 +0x2bd
Goroutine 8 (running) created at:
github.com/haproxytech/client-native/v5/runtime.(*HAProxyMock).Start()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/haproxy_mock.go:41 +0xa9
github.com/haproxytech/client-native/v5/runtime.TestSingleRuntime_DeleteCrtListEntry()
/Users/arastogi/Playground/client-native-haproxy/upstream/runtime/crt-lists_test.go:361 +0x48
testing.tRunner()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1595 +0x238
testing.(*T).Run.func1()
/usr/local/Cellar/go/1.21.2/libexec/src/testing/testing.go:1648 +0x44
==================
```
7 months ago
Thomas Lynch
c8d3b51838
move sanitize filename call
7 months ago
Marko Juraga
63ef2dfd08
BUG/MINOR: maps: fix sanitizing the filenames after id check
9 months ago
Andjelko Iharos
d2c1842ac5
MINOR: add printout for unexpected stat types to help in detecting stat socket format change
9 months ago
Andjelko Iharos
c54ca06946
BUG/MINOR: fix unintended lowercasing of backend server names fetched from runtime api
9 months ago
Zlatko Bratkovic
0348e36d88
CLEANUP/MINOR: lint: clean linter rules
9 months ago
Vincent Gramer
11f1ec4586
BUILD/MINOR: fix typo in doc and documentation
...
Signed-off-by: Vincent Gramer <vgramer@haproxy.com>
11 months ago
Thomas Lynch
dd31e060c4
Add DelSSLCert, print errors and cleanup addsetcommit
11 months ago
Thomas Lynch
f76fb882e9
Add AddSetCommitSSLCert to add cert and update crt-list
11 months ago
Thomas Lynch
cca99972a4
New dummy function
11 months ago
Marko Juraga
ae5ba9fb5d
BUILD/MAJOR: version: upgrade package to v5
11 months ago
Thomas Lynch
8c88d94fb8
remove version checks and make ssl attrs set properly
12 months ago
Zlatko Bratkovic
02024acc1f
BUILD/MEDIUM: ci: add local linter, increase Go version to 1.20
...
version in go.mod does not need to be increased
1 year ago
Marko Juraga
5a7eae724b
BUG/MINOR: version: add nil pointer safe guard to current version
1 year ago
Olivier Duclos
a164906e06
MEDIUM: runtime: Add support for "reload" using the master socket
...
This feature requires HAProxy 2.7 or later.
2 years ago
Olivier Duclos
2c4e5cb55d
MEDIUM: Make HAProxy version checking more natural
...
The `IsBiggerOrEqual` function now tests if the current HAProxy
version is bigger or equal to the given minimum version.
2 years ago
Olivier Duclos
3c347479f6
MINOR: runtime: add support for "del server"
2 years ago
Olivier Duclos
59b0ffcfd6
MINOR: runtime: add support for "add server"
2 years ago
Zlatko Bratkovic
996b6d50f3
MEDIUM: upgrade Go to 1.18
2 years ago
Marko Juraga
addd9983e9
MAJOR: upgrade: upgrade version to v4
2 years ago
Marko Juraga
7cdadc9461
BUG/MINOR: runtime_acls: fix return message on DELETE
2 years ago
Goran Galinec
2c9d3b3958
CLEANUP: fix linter warnings
2 years ago
Seena Fallah
fc1bc9e973
MAJOR: add set table api support
...
set table api create or update a stick-table entry in the table.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2 years ago
Moemen MHEDHBI
9afaaf96bc
MINOR: runtime: add PrepareMap CommitMap interface methods to runtime interface
2 years ago
Zlatko Bratkovic
57f50c20a1
MINOR: runtime: add Raw interface methods to runtime interface
2 years ago
Andjelko Iharos
2edebf6454
MINOR: improve error messages
2 years ago
Marko Juraga
ed0bf8aed9
BUG/MINOR: stick_table: fix parsing values with escaped spaces
2 years ago
Zlatko Bratkovic
92fa6e7b5b
CLEANUP/MINOR: improve documentation examples
2 years ago
Goran Galinec
9b9f1db2e0
BUG/MEDIUM: maps: return an empty list instead of nil for an empty maps file
2 years ago
Zlatko Bratkovic
b15a346a25
BUG/MINOR: runtime: use context for canceling jobs
...
single client did not use context and exited when other parts of runtime did
2 years ago
Zlatko Bratkovic
114fe7102c
BUG/MINOR: runtime: fix possible race on setting version
2 years ago
Zlatko Bratkovic
720e48977e
MAJOR: runtime: add New() and inteface for runtime
2 years ago
Zlatko Bratkovic
d05f44116c
BUG/MINOR: stick table: return error if no data found
2 years ago
Zlatko Bratkovic
02f6b312f3
BUG/MINOR: server: return error if no data found
2 years ago
Zlatko Bratkovic
875ec90ece
CLEANUP/MINOR: aditional liniter fixes
2 years ago
Zlatko Bratkovic
efe062c354
CLEANUP/MINOR: linter: align linters
2 years ago
Marko Juraga
cdede78c00
MAJOR: version: upgrade client-native to version 3
2 years ago
Marko Juraga
42e137f150
BUG/MINOR: runtime: fix runtime servers comparison
3 years ago
Marko Juraga
6c6553f510
BUG/MEDIUM: runtime: don't initialize with default if not a valid socket
3 years ago
Goran Galinec
19bc1977fc
CLEANUP/MINOR: fix various typos
3 years ago
Amel Husic
fb3a0ebe15
MEDIUM: acl: add acl payload atomicaly when possible
...
Starting with HAProxy 2.4 version, it is possible to replace
acl atomicaly with `prepare`, `add` and `commit` commands.
3 years ago
Amel Husic
1fa434226d
CLEANUP: linter: use short if syntax
3 years ago
Amel Husic
6ff444ea6b
CLEANUP: certs: remove unused code, use models when applicable
3 years ago
Amel Husic
4361de9df7
BUG/MINOR: runtime: remove redundant socket timeout
...
In ecb938de83
commit
socket timeout logic is added in `readFromSocket` func. `executeRaw` func doesn't need timeout anymore. More
important is that consecutive calls of `executeRaw` func will cause a deadlock in case that operation
take same / more time than `taskTimeout`, so `taskTimeout` case is removed from `executeRaw` func.
3 years ago
Amel Husic
a8fa79129d
MINOR: maps: added methods for other(clear, show, add) versioned runtime commands
3 years ago
Amel Husic
023cb23204
MEDIUM: maps: add map payload atomicaly when possible
...
Starting with HAProxy 2.4 version, it is possible to replace
maps atomicaly with `prepare`, `add` and `commit` commands.
Added support for this feature when HAProxy version is satisfied
with fallback to `add` command for prior versions.
3 years ago