[stable only] Configure logging in keepalived_state_change
In versions prior to Train, the "keepalived-state-change" monitor
does not format correctly the log messages. That happens when the
"Daemon.run()" method executes "unwatch_log". After the privileges
are dropped, the logging should be configured again.
Change-Id: Ief52fac479d4b3cfa5f90118235c241a14b1011f
Closes-Bug: #1886216
(cherry picked from commit 6fd89dacf3
)
This commit is contained in:
parent
76c5d02d3d
commit
3b6005fec9
|
@ -67,6 +67,7 @@ class MonitorDaemon(daemon.Daemon):
|
|||
# as root
|
||||
if not run_as_root:
|
||||
super(MonitorDaemon, self).run()
|
||||
config.setup_logging()
|
||||
self.handle_initial_state()
|
||||
for iterable in self.monitor:
|
||||
self.parse_and_handle_event(iterable)
|
||||
|
@ -158,7 +159,6 @@ def configure(conf):
|
|||
conf.set_override('log_dir', cfg.CONF.conf_dir)
|
||||
conf.set_override('debug', True)
|
||||
conf.set_override('use_syslog', True)
|
||||
config.setup_logging()
|
||||
agent_config.setup_privsep()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue