From 7564834b01b6fe97bff16fccdde99d026a6334d7 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 21 Jun 2018 10:22:57 -0700 Subject: [PATCH] Fix configured haproxy restarts In the unlikely even that the haproxy restarts after being configured, if the amphora is using systemd, the haproxy may fail to start. This is due to a missing "peer ID" command line option. This patch fixes the systemd unit to have the required "peer ID". Change-Id: I79cfc9a2e53b249337a189bdb08d13b24807021e Story: 2002638 Task: 22294 --- .../backends/agent/api_server/templates/systemd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octavia/amphorae/backends/agent/api_server/templates/systemd.conf.j2 b/octavia/amphorae/backends/agent/api_server/templates/systemd.conf.j2 index eb46eb8960..7088176836 100644 --- a/octavia/amphorae/backends/agent/api_server/templates/systemd.conf.j2 +++ b/octavia/amphorae/backends/agent/api_server/templates/systemd.conf.j2 @@ -11,7 +11,7 @@ SELinuxContext=system_u:system_r:haproxy_t:s0 Environment="CONFIG={{ haproxy_cfg }}" "USERCONFIG={{ haproxy_user_group_cfg }}" "PIDFILE={{ haproxy_pid }}" -ExecStartPre={{ haproxy_cmd }} -f $CONFIG -f $USERCONFIG -c -q +ExecStartPre={{ haproxy_cmd }} -f $CONFIG -f $USERCONFIG -c -q -L {{ peer_name }} ExecReload={{ haproxy_cmd }} -c -f $CONFIG -f $USERCONFIG -L {{ peer_name }} ExecReload=/bin/kill -USR2 $MAINPID