From 91919336b8f3c502a94338a8eb17e1338b546f1f Mon Sep 17 00:00:00 2001 From: Lisa Zangrando Date: Mon, 28 Nov 2016 18:27:03 +0100 Subject: [PATCH] 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=): {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 --- synergy_scheduler_manager/nova_manager.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/synergy_scheduler_manager/nova_manager.py b/synergy_scheduler_manager/nova_manager.py index 985f79f..d087504 100644 --- a/synergy_scheduler_manager/nova_manager.py +++ b/synergy_scheduler_manager/nova_manager.py @@ -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: