Commit 61598b5e authored by Julien Muchembled's avatar Julien Muchembled

NEO: fix log rotation

It was not working with wrappers to work around shebang length limitation.
parent 0c7344b2
......@@ -43,6 +43,7 @@ class NeoBaseRecipe(GenericBaseRecipe):
# useful, as per NEO deploying constraints.
raise UserError('"masters" parameter is mandatory')
option_list = [
# Keep the -l option first, as expected by logrotate snippets.
'-l', options['logfile'],
'-m', options['masters'],
'-b', self._getBindingAddress(),
......
......@@ -25,7 +25,7 @@ path = ${directory:promises}/neo-admin-promise
< = logrotate-entry-base
name = neo-admin
log = ${neo-admin:logfile}
post = {{ bin_directory }}/slapos-kill -n neoadmin -s RTMIN+1 ${:log}
post = {{ bin_directory }}/slapos-kill -s RTMIN+1 ${neo-admin:binary} -l ${:log}
[neoctl]
recipe = slapos.cookbook:wrapper
......
......@@ -33,4 +33,4 @@ path = ${directory:promises}/neo-master-promise
< = logrotate-entry-base
name = neo-master
log = ${neo-master:logfile}
post = {{ bin_directory }}/slapos-kill -n neomaster -s RTMIN+1 ${:log}
post = {{ bin_directory }}/slapos-kill -s RTMIN+1 ${neo-master:binary} -l ${:log}
......@@ -101,7 +101,7 @@ database-parameters = root@neo{{ i }}${my-cnf-parameters:socket}
< = logrotate-entry-base
name = {{ storage_id }}
log = {{ '${' + storage_id + ':logfile}' }}
post = {{ bin_directory }}/slapos-kill -n neostorage -s RTMIN+1 ${:log}
post = {{ bin_directory }}/slapos-kill -s RTMIN+1 ${neo-storage:binary} -l ${:log}
{% endfor -%}
[init-script]
......
......@@ -91,15 +91,15 @@ md5sum = f3259726bd5d824c569dc7db6b7d26a0
[instance-neo-admin]
<= download-base-neo
md5sum = d5eb14e3d83d7787950de913d7e29aad
md5sum = 6400c42696d79c3ffee0069cc1a1d424
[instance-neo-master]
<= download-base-neo
md5sum = c6e0db7344a26a55580102e3cc33c984
md5sum = 13c3cb57b29267bc3c4d1cf687fe8eb3
[instance-neo-storage-mysql]
<= download-base-neo
md5sum = c1cdb4289ff458545de15aca65121b80
md5sum = 7de8b69684a15692c38f2926821e3d18
[template-neo-my-cnf]
<= download-base-neo
......
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