-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissions module reload_delta
is not scoped to individual tables.
#3318
Comments
You would be correct in that But why do you want to reload them separately? Does it matter? Also:
That's not accurate. That's not what the documentation says its purpose is. |
I'm calling them separately because there's no function to call them together. ;) |
The reload_delta functionality was added because it was observed that excessive reloads (e.g. every few seconds) could cause issues under load, as mentioned in the docs. A workaround for your cfg is to add two individual timers for both reload commands, but this might cause some small drift between the two timer executions. Regarding changing the implementation or extending the documentation, a pull request could be of course created. |
Ah, okay. Personally, it seems to me the real problem is in the documentation's claim that |
Probably the developer thought only one of the tables are used in a Kamailio instance, they kind of overlap a lot in purpose and functionality. Personally I use only address table, I don't think I ever initiated a Kamailio deployment using the trusted table. Anyhow, because this kind of functionality seems to be needed in other places, I added support in core for rate-limiting the execution of RPC commands to specific time interval that can be set via the new core parameter The core value is checked first, being done when the rpc command is searched to be executed, so if it is lower than per module restriction (like in permissions), it hits first. The rate limiting is per command, but the time interval value is global, which should be (good) enough for now, imo. If more flexibility would be needed, one more thing that can be added is to make The new functionality is available only in devel version, it is not a candidate to be backported because it touches many places. Testing and feedback is appreciated. I think this issue can be closed if no other comments/proposals come in soon. |
Thank you. I'll try to create a testing situation around this. |
OK, open a new issue if any problem is found. |
Description
The permissions module has two reload RPC commands,
permissions.addressReload
which reloads theaddress
table, andpermissions.trustedReload
, which reloads thetrusted
table.The module parameter
reload_delta
exists to prevent concurrent reloading of a single table:If one of the reload rpc commands is issues (i.e.
permissions.addressReload
), then the OTHER reload command (permissions.trustedReload
) will be blocked, despite acting against two separate tables.Troubleshooting
Reproduced the issue.
Reproduction
(DB config for permissions module omitted for brevity)
Debugging Data
The above config yields output like this:
Possible Solutions
Ideally each reload would be tracked separately. This could possibly involve separate
reload_delta
parameters for each table (although it seems excessive to change the interface).It's also possible that this behavior is by design, in which case, clarification of the documentation for the
reload_delta
parameter would be nice.Additional Information
Problem occurs in kamailio 5.6.2. Likely within all version since the
reload_delta
parameter was added.Tested in Alpine, but OS seems irrelevant.
The text was updated successfully, but these errors were encountered: