How about not logging errors every time we shelve offload?
The delete_allocation_for_instance method does not return anything and "if not None" is always True, so we're always logging an error when we shelve offload an instance, which is not the most fun thing in the world. This was probably caused by some confusion with how remove_provider_from_instance_allocation works which does return a boolean result. Change-Id: I30b716b0649f6d367ea747149da5c5f921ae19c5 Closes-Bug: #1712689
This commit is contained in:
@@ -1272,10 +1272,7 @@ class ResourceTracker(object):
|
||||
self._update_usage(usage, nodename)
|
||||
|
||||
def delete_allocation_for_shelve_offloaded_instance(self, instance):
|
||||
res = self.reportclient.delete_allocation_for_instance(instance.uuid)
|
||||
if not res:
|
||||
LOG.error("Failed to clean allocation of a shelve offloaded "
|
||||
"instance", instance=instance)
|
||||
self.reportclient.delete_allocation_for_instance(instance.uuid)
|
||||
|
||||
def _verify_resources(self, resources):
|
||||
resource_keys = ["vcpus", "memory_mb", "local_gb", "cpu_info",
|
||||
|
||||
Reference in New Issue
Block a user