Commit a4a2555b authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Ensure logs are correctly linked

The logrotate folder also serves as an publication folder for logs, so be sure
that logs are linked there.
parent cb06535c
...@@ -30,7 +30,7 @@ md5sum = 19debfbc27c464f451b1eb5bb5ce3c84 ...@@ -30,7 +30,7 @@ md5sum = 19debfbc27c464f451b1eb5bb5ce3c84
[template-slave-list] [template-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = e142dad44db1a25d46a31661aa2f075f md5sum = 5f1d2fa5529e3ee8c6a99834e8374c48
[template-replicate-publish-slave-information] [template-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in _update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
......
...@@ -156,7 +156,8 @@ backup = {{ slave_log_folder }} ...@@ -156,7 +156,8 @@ backup = {{ slave_log_folder }}
[{{slave_ln_section}}] [{{slave_ln_section}}]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = false stop-on-error = false
command = ln -s {{slave_parameter_dict.get('error_log')}} {{ slave_log_folder }}/error.log && ln -s {{slave_parameter_dict.get('access_log')}} {{ slave_log_folder }}/access.log update-command = ${:command}
command = ln -sf {{slave_parameter_dict.get('error_log')}} {{ slave_log_folder }}/error.log && ln -sf {{slave_parameter_dict.get('access_log')}} {{ slave_log_folder }}/access.log
{#- Set password for slave #} {#- Set password for slave #}
......
...@@ -711,6 +711,14 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -711,6 +711,14 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
result.status_code, result.status_code,
'While accessing %r of %r the status code was %r' % ( 'While accessing %r of %r the status code was %r' % (
url, frontend, result.status_code)) url, frontend, result.status_code))
self.assertEqual(
httplib.OK,
requests.get(url + 'access.log', verify=False).status_code
)
self.assertEqual(
httplib.OK,
requests.get(url + 'error.log', verify=False).status_code
)
def assertKedifaKeysWithPop(self, parameter_dict, prefix=''): def assertKedifaKeysWithPop(self, parameter_dict, prefix=''):
generate_auth_url = parameter_dict.pop('%skey-generate-auth-url' % ( generate_auth_url = parameter_dict.pop('%skey-generate-auth-url' % (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment