1

我想修改所有租户的“配额”。在此地址中说“更改默认项目配额的最简单方法是编辑云控制器上的 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 ?
4

2 回答 2

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
于 2013-10-24T15:38:31.150 回答
2

Just add these lines

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

to set default values in your nova.conf file.

于 2013-10-16T06:42:36.173 回答