From 9978579fc18e3ea733fd7a32362fcaa0417743b7 Mon Sep 17 00:00:00 2001 From: Bob Fournier Date: Thu, 14 Mar 2019 21:08:31 -0400 Subject: [PATCH] Remove PXE filter logging Remove log messages which tend to fill up the inspector logs when debug is enabled without providing much value. Change-Id: Ib848a13f30f5ef0074c9e43eb0a414bec0254637 --- ironic_inspector/pxe_filter/base.py | 6 ------ ironic_inspector/test/unit/test_pxe_filter.py | 2 -- .../notes/remove_filter_logging-1a80419083c42bc6.yaml | 4 ++++ 3 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/remove_filter_logging-1a80419083c42bc6.yaml diff --git a/ironic_inspector/pxe_filter/base.py b/ironic_inspector/pxe_filter/base.py index 1427690a0..d952c6926 100644 --- a/ironic_inspector/pxe_filter/base.py +++ b/ironic_inspector/pxe_filter/base.py @@ -133,8 +133,6 @@ class BaseFilter(interface.FilterDriver): :raises: InvalidFilterDriverState :returns: nothing. """ - LOG.debug('The PXE filter driver %s enters the fsm_reset_on_error ' - 'context', self) try: yield self.fsm except automaton_errors.NotFound as e: @@ -148,9 +146,6 @@ class BaseFilter(interface.FilterDriver): {'filter': self, 'error': e}) self.reset() raise - finally: - LOG.debug('The PXE filter driver %s left the fsm_reset_on_error ' - 'context', self) @locked_driver_event(Events.initialize) def init_filter(self): @@ -177,7 +172,6 @@ class BaseFilter(interface.FilterDriver): :param ironic: obligatory ironic client instance :returns: nothing. """ - LOG.debug('Syncing the PXE filter driver %s', self) def get_periodic_sync_task(self): """Get periodic sync task for the filter. diff --git a/ironic_inspector/test/unit/test_pxe_filter.py b/ironic_inspector/test/unit/test_pxe_filter.py index e96d941f0..55f7a74db 100644 --- a/ironic_inspector/test/unit/test_pxe_filter.py +++ b/ironic_inspector/test/unit/test_pxe_filter.py @@ -211,8 +211,6 @@ class TestBaseFilterInterface(BaseFilterBaseTest): def test_sync(self): self.driver.sync(self.mock_ironic) - self.mock_log.debug.assert_called_once_with( - 'Syncing the PXE filter driver %s', self.driver) self.mock_reset.assert_not_called() def test_tear_down_filter(self): diff --git a/releasenotes/notes/remove_filter_logging-1a80419083c42bc6.yaml b/releasenotes/notes/remove_filter_logging-1a80419083c42bc6.yaml new file mode 100644 index 000000000..ae0485dc3 --- /dev/null +++ b/releasenotes/notes/remove_filter_logging-1a80419083c42bc6.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Remove debug logging for PXE filter driver which tends to fill up + inspector logs when debug is enabled.