FreeRADIUS 3.2: Add fail_on_errors option to rlm_sqlippool to make sure it returns 'fail' on queries - #5865
Conversation
|
? The |
|
Yes, but the problem is rlm_sqlippool returns 'fail' only in case 'handle' is null after query execution. |
|
I.e. easy sample: only 'find' query is defined with calling stored procedure. The procedure fails with SQL error.
|
|
Lemme 'outline' the flow a little bit. |
|
For the exact practical problem, sometimes pool transactions over InnoDB (especially Galera clusters) do deadlock. |
|
I really don't understand what you're getting at. The initial report says it returns "fail" and implies that's wrong, because v3 returns "noop". But the later comments say it returns "noop" when it should return "fail". And the patch makes it return "fail". Since this is v4 and it's unreleased, we don't need new configuration options to control changing behavior. If the module should do something different, then it should just be patched to be correct. |
|
Um, @alandekok I've corrected the initial report. Seems like I have described it rather ambiguously. This patch is against 3.2, not 4.0, and this new option brings behavior of 3.2 to at least something around what is expected and 4.0 does. |
rlm_sqlippool in FreeRADIUS 3.2 returns 'noop' when pool IP allocation queries fail, while it should return failure.
This makes it impossible to use rlm_sqlippool in redundant blocks for i.e. clustered SQL server redundancy or handling database failures otherwise.
This PR adds an extra boolean option called 'fail_on_errors' (disabled by default) which alters module behavior to return 'fail' instead of 'noop' in case some query fails.