Skip to content

Commit

Permalink
Merge pull request #18385 from knobunc/bug/bz1464657-seamless-handove…
Browse files Browse the repository at this point in the history
…r-haproxy-reload

Automatic merge from submit-queue (batch tested with PRs 18390, 18389, 18290, 18377, 18385).

Make haproxy pass open sockets when reloading

This changes the way we do a reload to take advantage of haproxy 1.8's seamless reload feature (described in https://www.haproxy.com/blog/truly-seamless-reloads-with-haproxy-no-more-hacks/)

Fixes bug 1464657 (https://bugzilla.redhat.com/show_bug.cgi?id=1464657)
  • Loading branch information
openshift-merge-robot committed Feb 2, 2018
2 parents 1fef218 + 98f7fc6 commit 49100d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/router/haproxy/conf/haproxy-config.template
Expand Up @@ -40,7 +40,7 @@ global
{{- end}}
ca-base /etc/ssl
crt-base /etc/ssl
stats socket /var/lib/haproxy/run/haproxy.sock mode 600 level admin
stats socket /var/lib/haproxy/run/haproxy.sock mode 600 level admin expose-fd listeners
stats timeout 2m

# Increase the default request size to be comparable to modern cloud load balancers (ALB: 64kb), affects
Expand Down
2 changes: 1 addition & 1 deletion images/router/haproxy/reload-haproxy
Expand Up @@ -105,7 +105,7 @@ if [ -n "$old_pids" ]; then
fi
fi

/usr/sbin/haproxy -f $config_file -p $pid_file -sf $old_pids
/usr/sbin/haproxy -f $config_file -p $pid_file -x /var/lib/haproxy/run/haproxy.sock -sf $old_pids
reload_status=$?

if [[ "$installed_iptables" == 1 ]]; then
Expand Down

0 comments on commit 49100d9

Please sign in to comment.