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
