From ccf76c36bb508a8cfd4e0f3a24fc1de7a77dc307 Mon Sep 17 00:00:00 2001 From: LIU Yulong Date: Fri, 29 Mar 2019 00:07:11 +0800 Subject: [PATCH] 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 --- neutron/agent/l3/ha_router.py | 6 +++++- ...dd-log-for-keepalived-state-change-e6d0c4f663776233.yaml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-log-for-keepalived-state-change-e6d0c4f663776233.yaml diff --git a/neutron/agent/l3/ha_router.py b/neutron/agent/l3/ha_router.py index 7cb6ade0b7a..8328478e355 100644 --- a/neutron/agent/l3/ha_router.py +++ b/neutron/agent/l3/ha_router.py @@ -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, diff --git a/releasenotes/notes/add-log-for-keepalived-state-change-e6d0c4f663776233.yaml b/releasenotes/notes/add-log-for-keepalived-state-change-e6d0c4f663776233.yaml new file mode 100644 index 00000000000..9583463b0db --- /dev/null +++ b/releasenotes/notes/add-log-for-keepalived-state-change-e6d0c4f663776233.yaml @@ -0,0 +1,4 @@ +--- +other: + - | + Add log file for ``neutron-keepalived-state-change`` daemon.