On 9 February 2012 17:13, Sándor Guba <[email protected]> wrote: > Yes this is my oned.conf AUTH_MAD part: > > AUTH_MAD = [ > executable = "one_auth_mad", > arguments = "--authz quota --authn > ssh,x509,ldap,server_cipher,server_x509" > ]
Any relevant information in the oned.log after a request from this user? Something like AUTHORIZE SUCCESS or some kind of error. > > > 2012/2/9 Daniel Molina <[email protected]>: >> Hi, >> >> On 9 February 2012 17:06, Sándor Guba <[email protected]> wrote: >>> Hi, >>> >>> I wanted to try out the quota system but isn't working for me... >>> >>> I'm using explicit quotas and start servers in sunstone: >>> >>> oneadmin@mega3:~/etc$ onequota list >>> UID STORAGE CPU MEMORY NUM_VMS >>> 22 20000 4 8192 4 >>> >>> oneadmin@mega3:~/etc$ onequota show 22 -f >>> UID STORAGE CPU MEMORY NUM_VMS >>> 22 0/20000 5/4 5120/8192 5/4 >>> >>> The user 22 exceeded his quota... >> >> Did you activate the authorization module inside the oned.conf? >> >> AUTH_MAD = [ >> executable = "one_auth_mad", >> arguments = "--authz quota --authn >> ssh,x509,ldap,server_cipher,server_x509" >> ] >> >> You have to add the "--authz quota" part, quotas are not enabled by default >> >> Cheers >> >>> >>> 2012/1/31 Akihiko Ota <[email protected]>: >>>> Hi Daniel, >>>> >>>> Ok, I have changed keys to uppercase. >>>> >>>> [ascadm@frontend]% grep -v '^#' /srv/cloud/one/etc/auth/quota.conf >>>> :db: sqlite:///srv/cloud/one/var/onequota.db >>>> :defaults: >>>> :CPU: 8 >>>> :MEMORY: 2048 >>>> :NUM_VMS: 2 >>>> :STORAGE: 10240 >>>> >>>> (Note that ":defaults:" needs to keep lowercase.) Then Default Quotas >>>> have worked correctly. >>>> >>>> [ascadm@frontend]% cat quotatest.one >>>> NAME = "quotatest" >>>> CPU = 4 >>>> VCPU = 4 >>>> MEMORY = 1024 >>>> OS = [ boot = "hd", arch = "x86_64" ] >>>> DISK = [ IMAGE_ID = 0, BUS = virtio ] >>>> NIC = [ NETWORK_ID = 0, model = "virtio" ] >>>> NIC = [ NETWORK_ID = 1, model = "virtio" ] >>>> >>>> [ascadm@frontend]% onevm create quotatest.one >>>> ID: 20 >>>> [ascadm@frontend]% onevm create quotatest.one >>>> ID: 21 >>>> [ascadm@frontend]% onevm create quotatest.one >>>> [VirtualMachineAllocate] User [2] : CPU quota exceeded (Quota: 8.0, >>>> Used: 8.0, Requested: 4.0); MEMORY quota exceeded (Quota: 2048, Used: >>>> 2048, Requested: 1024); NUM_VMS quota exceeded (Quota: 2, Used: 2, >>>> Requested: 1). >>>> >>>> [ascadm@frontend]% oneimage create image1.one >>>> ID: 6 >>>> [ascadm@frontend]% oneimage create image2.one >>>> ID: 7 >>>> [ascadm@frontend]% oneimage create image3.one >>>> [ImageAllocate] User [2] : STORAGE quota exceeded (Quota: 10240, Used: >>>> 10240, Requested: 5120). >>>> >>>> Thank you very much! >>>> >>>> -- >>>> Akihiko Ota >>>> >>>> >>>> 2012/1/30 Daniel Molina <[email protected]>: >>>>> Hi, >>>>> >>>>> On 29 January 2012 11:14, Akihiko Ota <[email protected]> wrote: >>>>>> Hi, >>>>>> >>>>>> I have configured Quotas according to the documentation [1] on my >>>>>> OpenNebula 3.2. Explicit User Quotas are working correctly. But it >>>>>> seems Default Quotas configured in the quota.conf >>>>>> (/srv/cloud/one/etc/auth/quota.conf) is ignored. >>>>>> Is this a quota's bug? or my mistake? >>>>>> >>>>>> I built OpenNebula 3.2 from source on CentOS 5.7 (x86_64). I am >>>>>> using ruby-1.9.3-p0 built from source instead of CentOS 5.7 RPM. >>>>>> Installation directory is self-contained. DB backend is sqlite. >>>>>> >>>>>> I configured quota.conf as follows: >>>>>> >>>>>> :db: sqlite:///srv/cloud/one/var/onequota.db >>>>>> :defaults: >>>>>> :cpu: 4 >>>>>> :memory: 1024 >>>>>> :num_vms: 1 >>>>>> :storage: 10240 >>>>> >>>>> Would you mind try using uppercase keys? If this fixes the problem I >>>>> will change these values in the conf file and documentation. >>>>> >>>>> Cheers >>>>> >>>>>> >>>>>> and restarted oned. But users can get resources more than described in >>>>>> quota.conf. Then I set special quotas for user "testuser" as follow: >>>>>> >>>>>> $ onequota set testuser cpu,memory,num_vms,storage 4,1024,1,10240 >>>>>> >>>>>> This quota works correctly. >>>>>> >>>>>> [ascadm@frontend]% oneuser list >>>>>> ID GROUP NAME AUTH PASSWORD >>>>>> 2 users testuser core (snip) >>>>>> [ascadm@frontend]% onevm create quotatest.one >>>>>> [VirtualMachineAllocate] User [2] : CPU quota exceeded (Quota: 4.0, >>>>>> Used: 0.0, Requested: 8.0); MEMORY quota exceeded (Quota: 1024, Used: >>>>>> 0, Requested: 22528). >>>>>> >>>>>> Thanks, >>>>>> >>>>>> [1] http://opennebula.org/documentation:rel3.2:quota_auth >>>>>> >>>>>> -- >>>>>> Akihiko Ota >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> [email protected] >>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>>>> >>>>> >>>>> >>>>> -- >>>>> Daniel Molina >>>>> Project Engineer >>>>> OpenNebula - The Open Source Toolkit for Data Center Virtualization >>>>> www.OpenNebula.org | [email protected] | @OpenNebula >>>>> _______________________________________________ >>>>> Users mailing list >>>>> [email protected] >>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>>> _______________________________________________ >>>> Users mailing list >>>> [email protected] >>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >> >> >> -- >> Daniel Molina >> Project Engineer >> OpenNebula - The Open Source Toolkit for Data Center Virtualization >> www.OpenNebula.org | [email protected] | @OpenNebula > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- Daniel Molina Project Engineer OpenNebula - The Open Source Toolkit for Data Center Virtualization www.OpenNebula.org | [email protected] | @OpenNebula _______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
