Invalid input for field/attribute quota_class_set

The optional input attribute 'force' for os-quota-class-sets is no more
supported in Mitaka and so NovaManager throws the following exception
reported in the log file:

ERROR - error on updating the quota info (id=<built-in function id>):
{u'badRequest': {u'message': u"Invalid input for field/attribute
quota_class_set. Value: {u'cores': 2, u'ram': 1024, u'force': True,
u'instances': 10}. Additional properties are not allowed
(u'force' was unexpected)", u'code': 400}}

- fixed method: NovaManager.updateQuota()
- moved some not useful logging info from LOG.info() to LOG.debug()

Change-Id: I72a401beee24b24bd2f8fc6dc8a3784813af0864
Sem-Ver: bugfix
Closes-bug: #1645397
This commit is contained in:
Lisa Zangrando 2016-11-28 18:27:03 +01:00
parent 0309dd1cc6
commit 91919336b8

View File

@ -69,7 +69,7 @@ class MessagingAPI(object):
def getRPCClient(self, target, version_cap=None, serializer=None):
assert self.TRANSPORT is not None
LOG.info("creating RPC client with target %s" % target)
LOG.debug("creating RPC client with target %s" % target)
return oslo_msg.RPCClient(self.TRANSPORT,
target,
version_cap=version_cap,
@ -78,7 +78,7 @@ class MessagingAPI(object):
def getRPCServer(self, target, endpoints, serializer=None):
assert self.TRANSPORT is not None
LOG.info("creating RPC server with target %s" % target)
LOG.debug("creating RPC server with target %s" % target)
return oslo_msg.get_rpc_server(self.TRANSPORT,
target,
endpoints,
@ -88,8 +88,8 @@ class MessagingAPI(object):
def getNotificationListener(self, targets, endpoints):
assert self.TRANSPORT is not None
LOG.info("creating notification listener with target %s endpoints %s"
% (targets, endpoints))
LOG.debug("creating notification listener with target %s endpoints %s"
% (targets, endpoints))
return oslo_msg.get_notification_listener(self.TRANSPORT,
targets,
endpoints,
@ -949,8 +949,7 @@ class NovaManager(Manager):
if is_class:
url = "os-quota-class-sets/%s" % quota.getId()
qs = {"quota_class_set": {"force": True,
"cores": quota.getSize("vcpus"),
qs = {"quota_class_set": {"cores": quota.getSize("vcpus"),
"ram": quota.getSize("memory"),
"instances": quota.getSize("instances")}}
else: