From e208cbb1f122b948af91a8d11c0f45dcec5bbc76 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 23 Aug 2017 17:27:05 -0400 Subject: [PATCH] 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 --- nova/compute/resource_tracker.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index 6437bff831..437c765d2e 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -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",