-
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
Change in behaviour in exec driver capabilities between 1.5.6 and 1.6.0-beta #17780
Comments
Using an OSS version of your jobspec There are at least 2 factors that affect Using a simple batch job to dump capabilities and ulimits, shows that while neither 1.5 nor 1.6 have the
So adding the So where does this new memlock limit come from? Nomad doesn't set ulimits directly, and the ~8gb doesn't match the 512mb limit set in the jobspec!
We use this package in Nomad v1.5.6 used Go 1.20.4 while v1.6 uses 1.20.5, but I see nothing in Go's changelog to suggest it would have started setting memlock: https://github.com/golang/go/issues?q=milestone%3AGo1.20.5+label%3ACherryPickApproved This is quite the mystery. I'll ask the team and keep digging. |
I've run git bisect between 1.5.6 and the current head of main and landed on the following, which is from #17535
|
Thank you @tgross! That led right to where the behavior changed and Nomad broke mlock without explicitly allowing the Prior to #17535 libcontainer unset the memlock limit to workaround an eBPF issue. You can actually see the infinite memlock limit in #12877 (excellent debugging by that reporter!). There is a lot I still don't understand here though:
There are 2 explanations for the strange libcontainer comments above (2 &3):
Either way I think answering The Docker driver maintains the 8gb default max locked memory limit, so |
After chatting with @tgross and @shoenig I feel fairly confident that Since all of Vault's docs point users toward This means that the |
Nomad version
Nomad v1.5.6+ent
BuildDate 2023-05-19T18:47:58Z
Revision bf13f39
vs
Nomad v1.6.0-beta.1+ent
BuildDate 2023-06-27T16:32:15Z
Revision b26558f
Operating system and Environment details
Ubuntu 22.04, same hardware, same OS, same setup.
Issue
I'm deploying Vault with the
exec
task driver, and on 1.5.6 it works fine; on 1.6.0-beta it fails to start due to not being able to mlock:Expected Result
It should work the same way on 1.5.6 and 1.6.0-beta. It seems to me it should only work with
cap_add = ["ipc_lock"]
which isn't a default capability, but doesn't seem like it's required on 1.5.6.Job file (if appropriate)
Note: a Nomad Variable
nomad/jobs/vault
with a key oflicense
is needed because I'm testing with Vault enterprise.Plugin config in the client config file needed to be able to add the capabilities (mandatory on 1.6):
The text was updated successfully, but these errors were encountered: