Support skel files to set quotas automatically for new users
|Assignee:||Ruben S. Montero||% Done:|
|Category:||Core & System|
|Target version:||Release 4.0|
For instance, /etc/one/skel/100.skel could contain a template that would be added to new users of group 100
#1 Updated by Nicolas AGIUS almost 9 years ago
A general default quota, as in 3.4, is also useful.
We want to restrict users to have only 1 vm each.
Our user's list will grow up, without explicit user creation, for example, using LDAP as the default auth driver.
But, time to time, we want to set specific quotas for some special users.
If we add more servers to the platform, we want to change the default quota from 1 to 2 vm per user and do it without changing special users's quota, as the previous quotas implementation was working.
#4 Updated by Ruben S. Montero almost 9 years ago
- Target version changed from Release 3.8 to Release 4.0
After analyzing this, default quotas somehow conflicts with the "unlimited" quota, as managed by OpenNebula right now. We have decided to move this to 4.0 and so change the quota interface. In the meantime, we are going to provide an option for bulk quota set. This is not exactly the functionality requested, but it'll help to implement the use case described.
#6 Updated by Ruben S. Montero over 8 years ago
Rolandas Naujikas wrote:
This regression in functionality doesn't allow for us migration to 3.6.
Do there exists some temporary workaround for automatically created LDAP users ?
There is also a new feature in 3.8, that may help you to do the migration till the same functionality is replicated in the core for 4.0.
We now have hooks that can be executed when a user is created, you could easily do a oneuser update and set the quotas to a default value.
Bear in mind,that first this is a workaround and the final solution will provide the complete functionality, and second this will set initial values for the quotas not a default quota (e.g. you need to update all users in order to change the default, fortunately we have a bulk updater)
Let me know if you need some hints to develop the hook.
Thanks for your feedback, and I hope this would be good enough to migrate to 3.8. Note also that there are major improvements over the previous quota system, in terms of performance, and features (although we missed this one)