Skip to content

Commit

Permalink
log stale allocations as WARNING instead of DEBUG
Browse files Browse the repository at this point in the history
Stale resource allocations can prevent Nova from scheduling new
instances on a host that otherwise has sufficient resources available.
Nova would log a message about this situation on the affected compute
node, but it was logged at DEBUG priority and so would typically not
be visible in a production environment.

This commit modifies Nova to log the message as a warning instead.

Change-Id: I347d2ab0077c4d9b62bc169af9e039d00ec214fa
Closes-bug: #1767553
(cherry picked from commit a54e5ed)
  • Loading branch information
larsks authored and notartom committed May 9, 2018
1 parent 7c7a5a6 commit 12a3b69
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions nova/compute/resource_tracker.py
Expand Up @@ -1309,12 +1309,13 @@ def _remove_deleted_instances_allocations(self, context, cn,
# that contains this source compute host information anyway and
# recreate an allocation that only refers to itself. So we
# don't need to do anything in that case. Just log the
# situation here for debugging information but don't attempt to
# delete or change the allocation.
LOG.debug("Instance %s has been moved to another host %s(%s). "
"There are allocations remaining against the source "
"host that might need to be removed: %s.",
instance_uuid, instance.host, instance.node, alloc)
# situation here for information but don't attempt to delete or
# change the allocation.
LOG.warning("Instance %s has been moved to another host "
"%s(%s). There are allocations remaining against "
"the source host that might need to be removed: "
"%s.",
instance_uuid, instance.host, instance.node, alloc)

def delete_allocation_for_evacuated_instance(self, context, instance, node,
node_type='source'):
Expand Down

0 comments on commit 12a3b69

Please sign in to comment.