Fix traefik config reload

Simply reloading traefik is not enough - we need to actually
write the new traefik.toml file.
This commit is contained in:
yuvipanda
2018-07-30 23:59:33 -07:00
parent 41a12a975e
commit 75ffa91c85

View File

@@ -15,7 +15,7 @@ import sys
import argparse import argparse
from ruamel.yaml import YAML from ruamel.yaml import YAML
from copy import deepcopy from copy import deepcopy
from tljh import systemd from tljh import systemd, traefik
yaml = YAML(typ='rt') yaml = YAML(typ='rt')
@@ -156,6 +156,8 @@ def reload_component(component):
# FIXME: Verify hub is back up? # FIXME: Verify hub is back up?
print('Hub reload with new configuration complete') print('Hub reload with new configuration complete')
elif component == 'proxy': elif component == 'proxy':
# FIXME: How to set path here?
traefik.ensure_traefik_config('/opt/tljh/hub/state')
systemd.restart_service('configurable-http-proxy') systemd.restart_service('configurable-http-proxy')
systemd.restart_service('traefik') systemd.restart_service('traefik')
print('Proxy reload with new configuration complete') print('Proxy reload with new configuration complete')