From 7326717d36d31e2cc383b535a4af06f0dae9e56d Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Wed, 18 Apr 2018 15:57:18 -0500 Subject: [PATCH] Make OVSDB debug logging optional OVSDB debug messages are very chatty and make log files much bigger without a lot of benefit 99.9% of the time. If there is ever a need for them because we are having a *really* weird OVSDB issue, then we can configure the jobs to turn them back on. Change-Id: I1d1e5e312509022084bcb651968bb9543ff61ba4 Closes-Bug: #1687065 --- neutron/agent/ovsdb/impl_idl.py | 3 ++- neutron/conf/agent/ovsdb_api.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron/agent/ovsdb/impl_idl.py b/neutron/agent/ovsdb/impl_idl.py index 2ee43441be6..50612251973 100644 --- a/neutron/agent/ovsdb/impl_idl.py +++ b/neutron/agent/ovsdb/impl_idl.py @@ -82,7 +82,8 @@ class OvsCleanup(command.BaseCommand): class NeutronOvsdbIdl(impl_idl.OvsdbIdl): def __init__(self, connection): - vlog.use_python_logger() + max_level = None if cfg.CONF.OVS.ovsdb_debug else vlog.INFO + vlog.use_python_logger(max_level=max_level) super(NeutronOvsdbIdl, self).__init__(connection) def ovs_cleanup(self, bridges, all_ports=False): diff --git a/neutron/conf/agent/ovsdb_api.py b/neutron/conf/agent/ovsdb_api.py index 7c13a85465f..14f6ba2a9a8 100644 --- a/neutron/conf/agent/ovsdb_api.py +++ b/neutron/conf/agent/ovsdb_api.py @@ -51,6 +51,9 @@ API_OPTS = [ 'when interacting with OVSDB. Required when using an ' '"ssl:" prefixed ovsdb_connection' )), + cfg.BoolOpt('ovsdb_debug', + default=False, + help=_('Enable OVSDB debug logs')), ]