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
  • Loading branch information
larsks committed Apr 28, 2018
1 parent c3c34a3 commit a54e5ed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions nova/compute/resource_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,12 +1328,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 a54e5ed

Please sign in to comment.