openstack高可用集群10-更改配额限制(quata)以及用户配额


1:quota相关配置:
1.1:查看当前配额:
[root@node1 ~]# neutron quota-show admin
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+---------------------+-------+
| Field               | Value |
+---------------------+-------+
| floatingip          | 50    |
| network             | 100   |
| port                | 500   |
| rbac_policy         | 10    |
| router              | 10    |
| security_group      | 10    |
| security_group_rule | 100   |
| subnet              | 100   |
| subnetpool          | -1    |
+---------------------+-------+
1.2:web端修改项目配额:
1.2.1:查看openstack配置文件(/etc/httpd/conf.d/openstack-dashboard.conf)是否开启配额限制:
1.2.2:修改web端配额:
1.3:修改/etc/neutron/neutron.conf:
1.3.1:控制端:
[quotas]
quota_network = 200
quota_subnet = 200
quota_port = 5000
quota_driver = neutron.db.quota.driver.DbQuotaDriver
quota_router = 100
quota_floatingip = 1000
quota_security_group = 100
quota_security_group_rule = 1000
#重启neutron服务
[root@node1 ~]# systemctl restart openstack-nova-api.service  neutron-server.service  neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
15.1.3.2:计算节点:
[quotas]
quota_network = 200
quota_subnet = 200
quota_port = 5000
quota_driver = neutron.db.quota.driver.DbQuotaDriver
quota_router = 100
quota_floatingip = 50
quota_security_group = 100
quota_security_group_rule = 1000
#重启neutron服务
[root@node3 ~]# systemctl  restart neutron-linuxbridge-agent
1.4:验证当前配额:
 
2:修改用户配额
2.1:单独调整单个用户的配额
 
2.2:修改默认配额
查看当前默认值
[root@node1 ~]# nova quota-defaults
+----------------------+-------+
| Quota                | Limit |
+----------------------+-------+
| instances            | 10    |
| cores                | 20    |
| ram                  | 51200 |
| metadata_items       | 128   |
| key_pairs            | 100   |
| server_groups        | 10    |
| server_group_members | 10    |
+----------------------+-------+
[root@node1 ~]# nova quota-class-update default --instances 20
[root@node1 ~]# nova quota-defaults
+----------------------+-------+
| Quota                | Limit |
+----------------------+-------+
| instances            | 20    |
| cores                | 20    |
| ram                  | 51200 |
| metadata_items       | 128   |
| key_pairs            | 100   |
| server_groups        | 10    |
| server_group_members | 10    |
+----------------------+-------+
 
常用命令
nova quota-class-update default --instances 20
nova quota-class-update default --cores 80
nova quota-class-update default --ram 512000
nova quota-class-update default --metadata_items 1280
nova quota-class-update default --key_pairs 1000
nova quota-class-update default --server_groups 80
nova quota-class-update default --server_group_members 80
 
 作者:Dexter_Wang   工作岗位:某互联网公司资深云计算与存储工程师  联系邮箱:993852246@qq.com


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM