-
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 Request] Using ACL, add a new purge-job capability so that we can restrict purging of our jobs #24147
Comments
We intend to make our ACLs more fine grained, but do you mean an ACL representing
Good news! Nomad v1.9.0 which is in beta will allow you to tag versions of jobs which prevents them from being purged/garbage-collected! #24055 is the PR. That being said it's unclear to me why when the developer prefers restarting a stopped job to running the job again. It should be the |
We want to implement a capability using ACL that will enable us to allow only specific people to be able to purge a job. Currently, there is no such capability supported by Nomad. Ideally, a When someone removes a job from Nomad, we don't know who did it. I also tried using the Events API (the I think if you guys can introduce an event type like I hope you understand our use case now.
Our jobs get updated regularly so tagging versions won't help us since it would eventually be incremented sooner or later.
We use If a job gets purged without being in our notice, many things that are dependent on them would fail leading to customer escalations and potential loss in revenue. Hence, we want to be notified when a job gets purged in order to protect and ensure our critical jobs keep running at all times. Please let me know if you need any further explanations. Thanks! |
@DamianArado that's all pretty clear. I do want to make sure you know that if you stop a job it becomes eligible for garbage collection after |
Yes, I'm aware of this. We can increase this threshold. Still, any of these would be quite helpful for us:
|
This is what I'm still curious about: you say that your concern is to keep jobs running but the feature request is about jobs that are not running (already stopped and eligible for purge/gc). By "running" do you mean "registered in Nomad and available in the Nomad API/UI for retrieval/editing"? If so this is possible today for service jobs by scaling them to 0 with In fact I think the
This seems like a reasonable feature request. If
You said the magic work ("dependent") so I'll link the original (ancient!) issue for that to capture your use case: #545 |
With
Okay, let me clarify this: By running, I mean these jobs should not be removed by unauthorized devs who are only allowed to view them.
We want to keep these jobs running on Nomad.
Will this job keep running on Nomad? Most of the time, our jobs have more than 1 allocation. So, will all these allocations keep running? If yes, then it will satisfy our use case.
I don't know if job-scale can solve our issue, let me first know your response. However, I can give you 2 possible features that we desire:
This won't completely solve the issue as many things that are dependent on our Nomad jobs run outside Nomad as well. |
@schmichael We just want to have a way to log which all jobs got purged on Nomad. |
@DamianArado I think we were trying pin down what you meant by "running" here, but I'm reasonably satisfied at this point. For clarity, the job object that you're trying to prevent from being GC'd has 3 states: pending, running, and dead (stopped). jobs only transition to dead when all allocations for the job are stopped and the
So with the information above, as @schmichael noted, this is covered today by the scale-job ACL (+
The event stream API already has a As @schmichael requested, I'll open a new issue for this. |
See: #24618 |
Thanks! @tgross |
Proposal
Currently, we have no control over the purging of our jobs on Nomad.
Use-cases
We want to restrict some developers' access to purge jobs on Nomad. Ideally, we want to achieve this using ACLs. Please add a new purge-job capability so that we can achieve our objective. Also, when a job is stopped on Nomad, it gets removed. We don't desire this to happen because sometimes, a dev is fixing bugs on that job and keeps it stopped for a while. After fixing the bugs, he starts the job back again so that it can fetch the new code now. Please ask if you want more clarification on our use case.
Attempted Solutions
No solution found yet: https://stackoverflow.com/questions/79053941/how-can-i-deny-users-the-capability-to-purge-jobs-from-nomad-ui/79054009#79054009
The text was updated successfully, but these errors were encountered: