Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 523236 - =app-misc/elasticsearch-1.3.2 - /etc/elasticsearch/logging.yml.sample breaks logging
Summary: =app-misc/elasticsearch-1.3.2 - /etc/elasticsearch/logging.yml.sample breaks...
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:02 UTC by Ferenc Erki
Modified: 2014-10-06 14:36 UTC (History)
0 users

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


Attachments
output of running elasticsearch manually (elasticsearch_logging_failure_output.log,4.07 KB, text/plain)
2014-09-19 14:02 UTC, Ferenc Erki
Details
Proposed changes to 1.3.2 (changes.diff,902 bytes, patch)
2014-10-03 09:48 UTC, Tony Vroon (RETIRED)
Details | Diff
Proposed patch for 1.3.2 (elasticsearch.patch,1.81 KB, patch)
2014-10-05 22:21 UTC, Ferenc Erki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferenc Erki 2014-09-19 14:02:44 UTC
Created attachment 385124 [details]
output of running elasticsearch manually

By default the ebuild creates /etc/elasticsearch/logging.yml.sample and gives instructions to copy this (and other sample files) to the according directories of default and/or addtional instances.

Starting with 1.3.2, and using an otherwise unmodified /etc/elasticsearch/logging.yml file, there are no further logs appended to /var/log/elasticsearch/_default/elasticsearch.log (or to the according logfile based on the cluster.name setting in elasticsearch.yml).

Trying to manually start elasticsearch with the same options the initscript would start it, it complains about /etc/elasticsearch/logging.yml.sample file (see attached output). If I remove the logging.yml.sample file, the logging looks to be working as expected again.

Proposed solution/workaround: install the sample files to an other location (/usr/share/elasticsearch/samples or similar perhaps?) and update the intructions in pkg_postinst() accordingly.
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2014-10-03 09:48:28 UTC
Created attachment 385984 [details, diff]
Proposed changes to 1.3.2

So other then the newer init/service file versions, I believe this will address the issue. Could you test and confirm please?
Comment 2 Ferenc Erki 2014-10-05 19:08:34 UTC
Looks like you would like to get rid of logging.yml.sample.

I'd like to clarify the situation: if you rename logging.yml.sample to logging.yml, it works just fine, so I would say the file itself is not faulty.

However, if you follow the instructions in pkg_postinst() and just copy the file, so there are both logging.yml and logging.yml.sample under /etc/elasticsearch, then it breaks logging.

So, that's why I originally proposed to install the sample file(s?) to another directory and update the instructions accordingly.

I'm going to attach a proposed ebuild here for 1.3.2-r1.
Comment 3 Ferenc Erki 2014-10-05 22:21:13 UTC
Created attachment 386108 [details, diff]
Proposed patch for 1.3.2

Proposed patch for 1.3.2, containing the following changes:
- don't rename upstream files to *.sample
- install sample configuration files to /usr/share/doc/${P}/examples instead of /etc/elasticsearch
- update pkg_postinst() instructions
- install updated initscript/service files proposed on bug #523238
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2014-10-06 14:36:09 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.