From b70f4320a296bf7111d276bef5e92c289fe5fa8f Mon Sep 17 00:00:00 2001 From: Nikola Dipanov Date: Thu, 1 Oct 2015 10:23:45 +0100 Subject: [PATCH] Change warn to debug logs when migration context is missing MigrationContext record missing is currently a regular situation. There will be no migration record at all (and thus no MigrationContext record) in case of a rebuild on the same host, and in case of evacuate request, which explicitly specifies the target host. With this in mind we demote the log messages that point out the missing migration context to debug. Change-Id: I96b6c859a9d450707f997e43e37f770e2a9dea7a --- nova/objects/instance.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nova/objects/instance.py b/nova/objects/instance.py index ccdbd5f5ad82..e8f9bf084e92 100644 --- a/nova/objects/instance.py +++ b/nova/objects/instance.py @@ -26,7 +26,7 @@ from nova.cells import utils as cells_utils from nova.compute import flavors from nova import db from nova import exception -from nova.i18n import _LE, _LW +from nova.i18n import _LE from nova import notifications from nova import objects from nova.objects import base @@ -811,17 +811,15 @@ class _BaseInstance(base.NovaPersistentObject, base.NovaObject, if self.migration_context: self.numa_topology = self.migration_context.new_numa_topology else: - LOG.warn(_LW("Trying to apply a migration context that does not " - "seem to be set for this instance"), - instance=self) + LOG.debug("Trying to apply a migration context that does not " + "seem to be set for this instance", instance=self) def revert_migration_context(self): if self.migration_context: self.numa_topology = self.migration_context.old_numa_topology else: - LOG.warn(_LW("Trying to revert a migration context that does not " - "seem to be set for this instance"), - instance=self) + LOG.debug("Trying to revert a migration context that does not " + "seem to be set for this instance", instance=self) @contextlib.contextmanager def mutated_migration_context(self):