-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Feature: set limits for exec driver #2352
Comments
What exactly are you trying to accomplish with that? We generally try to avoid leaking to many low level details into the job spec! |
Some processes need more resources (that controlled via limits) than others so I thought that it might be a nice fit for driver-specific options within job description. OTOH one may argue that it can be set on user level and different users can be used instead. |
Which limits are you interested, process and fd limits? |
Yeah, |
Just for the record,
If |
That would be really nice to have since one misbehaving container can easily bring down a node by leaking connections. |
Any chance that this will be implemented? |
@tantra35 Yes it will be. Not currently slated for a particular release. |
We are currently blocked by this in our production setup and cannot run ElasticSearch using the exec driver as ES apparently requires a ulimit of at least |
OTOH ES's requirement of 65k open fds seems absurd to me :/ (separate issue) |
Work-around (if running Nomad via Set |
CGroups (which the |
I tried a bunch of workarounds to apply Inside the task.
However, it's not "in use":
Running
However, I was able to set a higher limit for max open files by the process, by adjusting
So, now
But other
On restarting the agent:
This seems like a weird edge case where Nomad applies the limits inside the task only after a restart. Another workaround I tried, was to mount
Is there any way to signal "exec" driver to load |
👋 I'm going to close out this issue because frankly, we're not likely to implement limits in the @mr-karan, as for what you're seeing note that Nomad's |
Hmmm it's not that hard to write the code to exec the process in a new cgroups and apply some of hte same limits you can apply in other types of Nomad jobs. |
It's not a matter of difficulty, it's a matter of piling more features onto the |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Is it possible to configure Linux limits (as in https://linux.die.net/man/5/limits.conf) with Nomad when
exec
driver is used? It'd be great if it was possible to set them on the task level or at least on the client config level.The text was updated successfully, but these errors were encountered: