[one-users] Fwd: ONE 3.2 Default Quotas are ignored?

Sándor Guba gubasanyi at gmail.com
Thu Feb 9 08:26:43 PST 2012


I don't know if relevant but this is an ordinary user so the scheduler
starts vm.

I have no error in the log:

Thu Feb  9 17:08:08 2012 [AuM][D]: Message received: AUTHORIZE SUCCESS 28 -

Thu Feb  9 17:08:08 2012 [ReM][D]: VirtualMachineInfo method invoked
Thu Feb  9 17:08:09 2012 [AuM][D]: Message received: LOG I 29 ExitCode: 0

Thu Feb  9 17:08:09 2012 [AuM][I]: ExitCode: 0
Thu Feb  9 17:08:09 2012 [AuM][D]: Message received: AUTHORIZE SUCCESS 29 -

           This is the deploy part of the log:

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG D 201
tm_clone.sh: mega3:/var/lib/opennebula/var/images/7e419592ffab56bf4f5d36ab6871d3c6
mega3:/var/lib/opennebula/var//201/images/disk.0

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG D 201
tm_clone.sh: DST: /var/lib/opennebula/var//201/images/disk.0

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Creating directory /var/lib/opennebula/var//201/images

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Executed "mkdir -p /var/lib/opennebula/var//201/images".

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Executed "chmod a+w /var/lib/opennebula/var//201/images".

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Cloning
/var/lib/opennebula/var/images/7e419592ffab56bf4f5d36ab6871d3c6

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Executed "cp -r
/var/lib/opennebula/var/images/7e419592ffab56bf4f5d36ab6871d3c6
/var/lib/opennebula/var//201/images/disk.0".

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201
tm_clone.sh: Executed "chmod a+rw
/var/lib/opennebula/var//201/images/disk.0".

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: LOG I 201 ExitCode: 0

Thu Feb  9 16:55:32 2012 [TM][D]: Message received: TRANSFER SUCCESS 201 -

Thu Feb  9 16:55:32 2012 [VMM][D]: Message received: LOG I 201 ExitCode: 0

Thu Feb  9 16:55:32 2012 [VMM][D]: Message received: LOG I 201
Successfully execute network driver operation: pre.

Thu Feb  9 16:55:34 2012 [VMM][D]: Message received: LOG I 201 ExitCode: 0

Thu Feb  9 16:55:34 2012 [VMM][D]: Message received: LOG I 201
Successfully execute virtualization driver operation: deploy.

Thu Feb  9 16:55:34 2012 [VMM][D]: Message received: LOG I 201 ExitCode: 0

Thu Feb  9 16:55:34 2012 [VMM][D]: Message received: LOG I 201
Successfully execute network driver operation: post.

Thu Feb  9 16:55:34 2012 [VMM][D]: Message received: DEPLOY SUCCESS 201 one-201

Thu Feb  9 16:55:34 2012 [ReM][D]: VirtualMachinePoolInfo method invoked


2012/2/9 Daniel Molina <dmolina at opennebula.org>:
> On 9 February 2012 17:13, Sándor Guba <gubasanyi at gmail.com> 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 <dmolina at opennebula.org>:
>>> Hi,
>>>
>>> On 9 February 2012 17:06, Sándor Guba <gubasanyi at gmail.com> 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 at mega3:~/etc$ onequota list
>>>>  UID  STORAGE      CPU   MEMORY  NUM_VMS
>>>>  22    20000        4     8192        4
>>>>
>>>> oneadmin at 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 <skywalker.37th at gmail.com>:
>>>>> Hi Daniel,
>>>>>
>>>>> Ok, I have changed keys to uppercase.
>>>>>
>>>>> [ascadm at 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 at 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 at frontend]% onevm create quotatest.one
>>>>> ID: 20
>>>>> [ascadm at frontend]% onevm create quotatest.one
>>>>> ID: 21
>>>>> [ascadm at 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 at frontend]% oneimage create image1.one
>>>>> ID: 6
>>>>> [ascadm at frontend]% oneimage create image2.one
>>>>> ID: 7
>>>>> [ascadm at 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 <dmolina at opennebula.org>:
>>>>>> Hi,
>>>>>>
>>>>>> On 29 January 2012 11:14, Akihiko Ota <skywalker.37th at gmail.com> 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 at frontend]% oneuser list
>>>>>>>  ID GROUP    NAME            AUTH                PASSWORD
>>>>>>>   2 users    testuser        core                  (snip)
>>>>>>> [ascadm at 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
>>>>>>> Users at lists.opennebula.org
>>>>>>> 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 | dmolina at opennebula.org | @OpenNebula
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.opennebula.org
>>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opennebula.org
>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opennebula.org
>>>> 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 | dmolina at opennebula.org | @OpenNebula
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> 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 | dmolina at opennebula.org | @OpenNebula



More information about the Users mailing list