我想修改所有租户“配额”。在this address中说“更改默认项目配额的最简单方法是编辑云控制器上的nova.conf文件。”但在我的nova / nova.conf中,配额没有任何内容。这是我的nova / nova.conf。
[DEFAULT]
logdir = /var/log/nova
state_path = /var/lib/nova
lock_path = /var/lib/nova/tmp
volumes_dir = /etc/nova/volumes
dhcpbridge = /usr/bin/nova-dhcpbridge
dhcpbridge_flagfile = /etc/nova/nova.conf
force_dhcp_release = False
injected_network_template = /usr/share/nova/interfaces.template
libvirt_nonblocking = True
libvirt_inject_partition = -1
network_manager = nova.network.manager.FlatDHCPManager
iscsi_helper = tgtadm
sql_connection = mysql://nova:848faef007254c3a@10.0.3.238/nova
compute_driver = libvirt.LibvirtDriver
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
rpc_backend = nova.openstack.common.rpc.impl_qpid
rootwrap_config = /etc/nova/rootwrap.conf
qpid_reconnect_interval_min=0
image_service=nova.image.glance.GlanceImageService
qpid_hostname=10.0.3.238
qpid_tcp_nodelay=True
qpid_port=5672
qpid_protocol=tcp
glance_api_servers=10.0.3.238:9292
qpid_username=guest
qpid_reconnect_interval=0
metadata_host=10.0.3.238
api_paste_config=/etc/nova/api-paste.ini
volume_api_class=nova.volume.cinder.API
debug=False
ec2_listen=0.0.0.0
service_quantum_metadata_proxy=False
osapi_compute_workers=2
qpid_reconnect_timeout=0
enabled_apis=ec2,osapi_compute,metadata
qpid_reconnect=True
auth_strategy=keystone
service_down_time=60
verbose=True
floating_range=10.3.4.0/22
auto_assign_floating_ip=False
flat_interface=lo
public_interface=eth0
default_floating_pool=nova
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter
flat_network_bridge=br100
connection_type=libvirt
cpu_allocation_ratio=16.0
libvirt_cpu_mode=none
fixed_range=192.168.32.0/22
dhcp_domain=novalocal
libvirt_type=qemu
novncproxy_port=6080
vncserver_proxyclient_address=10.0.3.238
flat_injected=False
novncproxy_host=0.0.0.0
libvirt_use_virtio_for_bridges = False
use_ipv6 = True
[keystone_authtoken]
admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD%
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
signing_dir = /tmp/keystone-signing-nova
Could someone help me ?
答案 0 :(得分:2)
只需添加这些行
即可quota_instances=10 # Number of instances allowed per project
quota_cores=20 # Number of cores allowed per project
quota_ram=51200 # Amount of memory in MB allowed per project
quota_gigabytes=1000 # Amount of storage in GB allowed per project
在nova.conf文件中设置默认值。
答案 1 :(得分:2)
您可以使用nova命令调整租户的配额租户。您不需要触摸/etc/nova/nova.conf
也不需要重新启动nova进程,但只更新数据库。
它可以通过像这样的bash命令轻松浏览所有租户:
$ for tenant_id in $(keystone tenant-list | awk '{print $2}'); do
nova quota-update --cores 20 --ram 51200 ${tenant_id}
done