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
This commit is contained in:
Terry Wilson 2018-04-18 15:57:18 -05:00
parent 390cc07c8c
commit 7326717d36
2 changed files with 5 additions and 1 deletions

View File

@ -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):

View File

@ -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')),
]