Add log file for neutron-keepalived-state-change

neutron-keepalived-state-change may not start but have no method
to find out why. This patch adds the log file for it.

Change-Id: I688a6e6d0ac42c00d87571484f726e0eae091675
Related-Bug: #1822155
This commit is contained in:
LIU Yulong 2019-03-29 00:07:11 +08:00
parent 041203f1bb
commit ccf76c36bb
2 changed files with 9 additions and 1 deletions

View File

@ -362,13 +362,17 @@ class HaRouter(router.RouterInfo):
def _get_state_change_monitor_callback(self):
ha_device = self.get_ha_device_name()
ha_cidr = self._get_primary_vip()
config_dir = self.keepalived_manager.get_conf_dir()
state_change_log = (
"%s/neutron-keepalived-state-change.log") % config_dir
def callback(pid_file):
cmd = [
'neutron-keepalived-state-change',
'--router_id=%s' % self.router_id,
'--namespace=%s' % self.ha_namespace,
'--conf_dir=%s' % self.keepalived_manager.get_conf_dir(),
'--conf_dir=%s' % config_dir,
'--log-file=%s' % state_change_log,
'--monitor_interface=%s' % ha_device,
'--monitor_cidr=%s' % ha_cidr,
'--pid_file=%s' % pid_file,

View File

@ -0,0 +1,4 @@
---
other:
- |
Add log file for ``neutron-keepalived-state-change`` daemon.