From 6ece888c790475e529163810a8f01b5ffa65c8ea Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Thu, 23 Aug 2018 16:57:51 +0200 Subject: [PATCH] Remove noisy DEBUG log There is a DEBUG log coming from the notification sending code path that tries to populate the notification payload from a nova OVO and encounters an unset / non-lazy loadable field in the source OVO. As there are fields like MonitorMetric.numa_membw_values that are notorious unset in many circumstances but used in the MetricPayload we got excessive DEBUG logging from this code path. This patch removes the offending logging statement as soo far we failed to found cases based on this log where anything else we could do than what the code anyhow does, defaulting the payload field to None. Change-Id: I680e1d9860d839a76e229c4891933872388eb050 Closes-Bug: #1788634 (cherry picked from commit 375632cbc9019f0e4e887afb5d6e48978f2a1a26) (cherry picked from commit 3724280716703bad54d6dc434b4b1679243113d9) --- nova/notifications/objects/base.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nova/notifications/objects/base.py b/nova/notifications/objects/base.py index 2d7b4b46499e..f105f5cd6daa 100644 --- a/nova/notifications/objects/base.py +++ b/nova/notifications/objects/base.py @@ -122,12 +122,10 @@ class NotificationPayloadBase(NotificationObject): except (exception.ObjectActionError, NotImplementedError, exception.OrphanedObjectError, - ovo_exception.OrphanedObjectError) as e: - LOG.debug(("Defaulting the value of the field '%(field)s' " - "to None in %(payload)s due to '%(exception)s'"), - {'field': key, - 'payload': self.__class__.__name__, - 'exception': e}) + ovo_exception.OrphanedObjectError): + # If it is unset or non lazy loadable in the source object + # then we cannot do anything else but try to default it in the + # payload object we are generating here. # NOTE(gibi): This will fail if the payload field is not # nullable, but that means that either the source object is not # properly initialized or the payload field needs to be defined