The `-f` command line option of elasticsearch for running it in the foreground, has been dropped (and replaced with `-d` for daemonizing it), and this behaviour has been made default. Upstream thread about the change starts here: https://github.com/elasticsearch/elasticsearch/issues/4392 This option can be dropped from files/elasticsearch.init2 (and possibly it can replace files/elasticsearch.init as that seems to be unused now). Reproducible: Always
p.s.: the `-f` option could also be dropped from files/elasticsearch.service as well.
Created attachment 385978 [details] elasticsearch.init3
Created attachment 385980 [details] elasticsearch.service2
(In reply to Ferenc Erki from comment #0) > This option can be dropped from files/elasticsearch.init2 (and possibly it > can replace files/elasticsearch.init as that seems to be unused now). Thank you. Because of how we use CVS I must keep the filename unique, so it will be init3. I have attached the two modified files so you can verify I have done it correctly.
Thanks for the feedback, I'm going to test the new initscript. If I would like to propose another change for it, would you prefer adding that here or on a separate bug? I'm just asking because of the file numbering increase you mentioned.
If you have further improvements for the init script they can be reported in this bug. However, once I commit the change and close the bug, a new one instead please.
In server_args, most of the options use -Des.* prefix instead of -Des.default.* and this prevents the user to override the same options from /etc/elasticsearch/elasticsearch.yml. For example I tried to set a different path.data in the yml file, but it doesn't get used, because the -Des.path.data takes precedence. If there would be -Des.default.path.data in the initscript, its value could be overridden from the yml file. It's most probably true for the other similar options in the server_args as well. I need to do some more testing locally, but then I can attach a proposed initscript which can hopefully fix both issues.
That sounds worthwhile. I will wait for your update before releasing 1.3.2-r1, so it will be init3 still.
Created attachment 386104 [details] elasticsearch.init3 Proposed initscript for 1.3.2-r1, with the following changes: - fix spelling (ElasticSearch -> Elasticsearch) - remove deprecated -f option - use -Des.default.* CLI options instead of -Des.* in order to be able to override the same settings from the yml configuration file
Created attachment 386106 [details] elasticsearch.service2 Proposed service file for 1.3.2-r1, with the same changes as described for the initscript above.
+*elasticsearch-1.3.2-r1 (06 Oct 2014) + + 06 Oct 2014; Tony Vroon <chainsaw@gentoo.org> +elasticsearch-1.3.2-r1.ebuild, + +files/elasticsearch.init3, +files/elasticsearch.service2: + Much improved init script, systemd service file and user configuration + respect after a refactoring by Ferenc Erki. His work closes bug #523236 and + #523238. Thank you for your contribution to Gentoo Linux. If you get inspired further, please let me have a new bug.