Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 523238 - =app-misc/elasticsearch-1.3.2 - /etc/init.d/elasticsearch uses obsolete command line -f instead of -d
Summary: =app-misc/elasticsearch-1.3.2 - /etc/init.d/elasticsearch uses obsolete comma...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 14:16 UTC by Ferenc Erki
Modified: 2014-10-06 14:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
elasticsearch.init3 (elasticsearch.init3,2.23 KB, text/plain)
2014-10-03 08:29 UTC, Tony Vroon (RETIRED)
Details
elasticsearch.service2 (elasticsearch.service2,271 bytes, text/plain)
2014-10-03 08:29 UTC, Tony Vroon (RETIRED)
Details
elasticsearch.init3 (elasticsearch.init3,2.26 KB, text/plain)
2014-10-05 22:05 UTC, Ferenc Erki
Details
elasticsearch.service2 (elasticsearch.service2,279 bytes, text/plain)
2014-10-05 22:07 UTC, Ferenc Erki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferenc Erki 2014-09-19 14:16:16 UTC
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
Comment 1 Ferenc Erki 2014-09-19 14:17:47 UTC
p.s.: the `-f` option could also be dropped from files/elasticsearch.service as well.
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2014-10-03 08:29:10 UTC
Created attachment 385978 [details]
elasticsearch.init3
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2014-10-03 08:29:47 UTC
Created attachment 385980 [details]
elasticsearch.service2
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2014-10-03 08:30:47 UTC
(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.
Comment 5 Ferenc Erki 2014-10-05 14:02:25 UTC
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.
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2014-10-05 14:47:55 UTC
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.
Comment 7 Ferenc Erki 2014-10-05 15:03:17 UTC
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.
Comment 8 Tony Vroon (RETIRED) gentoo-dev 2014-10-05 15:22:02 UTC
That sounds worthwhile. I will wait for your update before releasing 1.3.2-r1, so it will be init3 still.
Comment 9 Ferenc Erki 2014-10-05 22:05:27 UTC
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
Comment 10 Ferenc Erki 2014-10-05 22:07:27 UTC
Created attachment 386106 [details]
elasticsearch.service2

Proposed service file for 1.3.2-r1, with the same changes as described for the initscript above.
Comment 11 Tony Vroon (RETIRED) gentoo-dev 2014-10-06 14:36:18 UTC
+*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.