openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #10031
Re: control user quota
>>"You can set quotas per tenant"
+1 there is no quota for user.
nova-manage example with Diablo Openstack.
#nova-manage project quota ACME
metadata_items: 128
instances: 10
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 20
ram: 51200
floating_ips: 10
#nova-manage project quota ACME --key=instances --value=7
metadata_items: 128
instances: 7
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 20
ram: 51200
floating_ips: 10
default values you can find
in /usr/lib/python2.6/site-packages/nova/quota.py
flags.DEFINE_integer('quota_instances', 10,
'number of instances allowed per project')
flags.DEFINE_integer('quota_cores', 20,
'number of instance cores allowed per project')
flags.DEFINE_integer('quota_ram', 50 * 1024,
'megabytes of instance ram allowed per project')
flags.DEFINE_integer('quota_volumes', 10,
'number of volumes allowed per project')
flags.DEFINE_integer('quota_gigabytes', 1000,
'number of volume gigabytes allowed per project')
flags.DEFINE_integer('quota_floating_ips', 10,
'number of floating ips allowed per project')
flags.DEFINE_integer('quota_metadata_items', 128,
'number of metadata items allowed per instance')
flags.DEFINE_integer('quota_max_injected_files', 5,
'number of injected files allowed')
flags.DEFINE_integer('quota_max_injected_file_content_bytes', 10 * 1024,
'number of bytes allowed per injected file')
flags.DEFINE_integer('quota_max_injected_file_path_bytes', 255,
'number of bytes allowed per injected file path')
Anton Haldin
2012/4/12 Kuo Hugo <tonytkdk@xxxxxxxxx>
> nova-manage
> http://nova.openstack.org/runnova/nova.manage.html
>
> nova-manage project quota <projectname>
>
> example :
> #list xin-project 's quota
> $>nova-manage project quota xin-project
> Will return several key/value
>
> #modify a key with new value
>
> $>nova-manage project quota xin-project --key=??? --value=???
>
> https://github.com/openstack/nova/blob/master/nova/quota.py
>
> For configuration flags please refer to the above link of quota.py
>
>
> Xin Zhao <xzhao@xxxxxxx> 於 2012年4月13日上午12:15 寫道:
>
>> Hi Kuo,
>>
>> Could you give more details, like the commands used, and settings in the
>> config file ? I can't find a good example for them.
>>
>> Thanks,
>> Xin
>>
>>
>> On 4/12/2012 12:04 PM, Kuo Hugo wrote:
>>
>> I did a quick test in Essex .
>> The process almost same as before(Cactus/Diablo)
>>
>> 1. Manage Quota for a specified "Tenant" from nova-manage .
>> 2. Manage Default Quota parameters from nova.conf with several flags
>> 3. Hacking Nova source code quota.py for default values.
>>
>>
>>
>> Hope it helps.
>>
>>
>>
>> Xin Zhao <xzhao@xxxxxxx> 於 2012年4月12日下午10:27 寫道:
>>
>>> Hello,
>>>
>>> I try to assign quota to individual users, to control how many instances
>>> each user can run concurrently. But I don't see a doc describing how to do
>>> that. I use diablo release.
>>> Any help or doc pointer will be greatly appreciated.
>>>
>>> Xin
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>> --
>> +Hugo Kuo+
>> tonytkdk@xxxxxxxxx
>> + <tonytkdk@xxxxxxxxx>886 935004793
>>
>>
>>
>
>
> --
> +Hugo Kuo+
> tonytkdk@xxxxxxxxx
> + <tonytkdk@xxxxxxxxx>886 935004793
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
References