Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit f3f7af0

Browse files
committed
force reload the haproxy on USR1 signal
1 parent 782b4f7 commit f3f7af0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,5 +436,3 @@ In most cases, `dockercloud/haproxy` will configure itself automatically when th
436436

437437
* `docker exec <haproxy_id> /reload.sh`, if you are on the node where dockercloud/haproxy deploys
438438
* `docker-cloud exec <haproxy_uuid> /reload.sh`, if you use docker-cloud cli
439-
440-
Note: when `reload.sh` is invoked, it doesn't necessarily mean that HAProxy will be restarted. In fact, `dockercloud/haproxy` will try to get the current information of the the service and calculate a new configuration. HAProxy will only be restarted when the newly generated configuration differs from the current one.

haproxy/eventhandler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ def on_websocket_close():
4545

4646

4747
def on_user_reload(signum, frame):
48-
run_haproxy("User reload")
48+
Haproxy.cls_cfg = None
49+
if config.LINK_MODE == "legacy":
50+
logger.info("User reload is not supported in legacy link mode")
51+
else:
52+
run_haproxy("User reload")
4953

5054

5155
def listen_dockercloud_events():

0 commit comments

Comments
 (0)