zoukankan      html  css  js  c++  java
  • Openstack的配额共功能的使用

    在一个云系统中,一个项目不能无限制的使用资源,必须对项目进行配额管理,在openstack中主要的命令是nova quota-update, 但是可能会提示的错误:

    DEBUG (shell:740) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-76ec703e-566e-4133-af5d-d822a6750969)
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 737, in main
        OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
      File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 673, in main
        args.func(self.cs, args)
      File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 3198, in do_quota_update
        _quota_update(cs.quotas, args.tenant, args)
      File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 3070, in _quota_update
        **updates)
      File "/usr/lib/python2.6/site-packages/novaclient/v1_1/quotas.py", line 77, in update
        return self._update(url, body, 'quota_set')
      File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 158, in _update
        _resp, body = self.api.client.put(url, body=body)
      File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 235, in put
        return self._cs_request(url, 'PUT', **kwargs)
      File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 213, in _cs_request
        **kwargs)
      File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 195, in _time_request
        resp, body = self.request(url, method, **kwargs)
      File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 189, in request
        raise exceptions.from_response(resp, body, url, method)
    ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-76ec703e-566e-4133-af5d-d822a6750969)
    ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-76ec703e-566e-4133-af5d-d822a6750969)
    

    提示基本没有帮助。这里我们的原因是因为使用了fuel-web,他的默认配置文件中是不是用配额管理! 在/etc/nova/nova.conf配置文件中有

    quota_driver=nova.quota.DbQuotaDriver
    #quota_driver=nova.quota.NoopQuotaDriver
    

    我们必须启用DbQuotaDriver才可以,修改后执行/etc/init.d/openstack-nova-api restart即可

  • 相关阅读:
    Java最大栈深度有多大?-从一道面试题开始学习JVM
    高性能队列——Disruptor
    高性能的Redis之对象底层实现原理详解
    高性能的Redis之数据持久化小结
    高性能的Redis之数据结构小结
    Redis单线程为什么如此之快?
    kafka partition与 group的特性
    深扒Disruptor高性能的原因
    Python 元类编程实现一个简单的 ORM
    用vue.js实现的期货,股票的实时K线
  • 原文地址:https://www.cnblogs.com/CLTANG/p/4332573.html
Copyright © 2011-2022 走看看