-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix(secrets): Warn if OS limit for locked memory is too low #12993
Conversation
c5799cf
to
160d800
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok played with this a bit an created a config with 10x influxdb_v2 outputs each using a secret and reduced the ulimit to 64K:
2023-03-31T14:10:25Z I! Found 10 secrets...
2023-03-31T14:10:25Z W! Insufficient lockable memory 64kb when 80kb is required. Please increase the limit for Telegraf in your Operating System!
and after increasing to 80k it did not show up. I had Windows up and all I tested that the binary continued to work.
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
(cherry picked from commit d8adb1e)
relates to #12980
Plugins using secrets rely on locked memory in Telegraf. Due to limitations in the underlying library, each secret will use two pages of (locked) memory for the access time. Some operating systems or operators set a low limit on the maximum allowed amount of locked memory, making Telegraf hang (see #12924 or #12980) or panic of too many secrets are accessed at the same time. To be on the safe-side, warn the user if the limit set by the OS is too low for the number of secrets managed.