-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add user specific quotas #26
Conversation
/cc @yuvipanda for his opinion |
(thank you for the patch! I'll look into this sometime within the next week!) Also cc @minrk for his thoughts, if he has time to spare. |
53d2307
to
c942549
Compare
user_without_quotas will overwrite mem_limit/cpu_limit. Users in this list will have unlimited RAM and CPU. special_user_quotas will overwrite mem_limit and cpu_limit for a specific user. It is possible to set mem_limit OR/AND cpu_limit. user_without_quotas is stronger than special_user_quotas.
c942549
to
fb25e8f
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.
Thanks for the PR @RobinFrcd. Some small suggestions for now. Probably should add in the unlimited help text that by setting unlimited to true that the user could use all the resources of the cluster.
@@ -70,6 +69,21 @@ class SystemdSpawner(Spawner): | |||
""" | |||
).tag(config=True) | |||
|
|||
users_without_quotas = Set( |
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.
Hi and thanks for the PR :-)
Perhaps this would be better as a Bool similar to https://github.com/jupyterhub/jupyterhub/blob/master/jupyterhub/app.py#L453
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.
So, in that case, we would enable this 'no quotas mode' for all user in the admin group ? So you want to check that the user is in Authenticator.admin_users
and that users_without_quotas
is True
?
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.
Sorry @RobinFrcd. I didn't mean to confuse. The overarching point that I'm trying to make (though not eloquently) is that any time a user (admin or otherwise) has the ability to use all the resources that should be an opt-in action instead of the default.
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.
Well, if a user is in users_without_quotas
he has the ability to use all the resources. If he's not in, he can't. So the default is that a user can't use all the resources. I think I don't get the point here ! :)
special_user_quotas = Dict( | ||
None, | ||
allow_none=True, | ||
help='Dict with users as key and cpu_limit/mem_limit as value. It will overwrite mem_limit/cpu_limit.' |
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.
Let's put the help in triple quotes. help="""Dict with...
Is this something that's still a possibiltiy? The abilitiy to have different resource limits on a user or group level would be fantastic. |
This seems like a very relevant feature, soo much that it should be relevant for other cases than quotas - such as user specific . This is whats proposed in #98, I'll close this in favor of that. |
Hi,
I've added two configuration parameters:
user_without_quotas
will overwrite mem_limit/cpu_limit. Users in thislist will have unlimited RAM and CPU.
special_user_quotas
will overwrite mem_limit and cpu_limit for aspecific user. It is possible to set mem_limit OR/AND cpu_limit.
user_without_quotas is stronger than special_user_quotas.
Hope it will be useful.