-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New PID file issues #60
Comments
I "fixed" it today by commenting that line out. Kibana will write it's own pid file in any case so that line in the init template is 100% redundant (and harmful to begin with) |
Hi @yuval-adar Is your issue before or after the merge of my patch #61 I also mentioned I am not convinced that the Init script should be writing a PID file, although I say that without knowing what the race-condition issue was that @lesaux was dealing with. |
Looks like i have the version that is older than that by some 10 days In any case there should be no reason to write the pid file from init script as long as kibana writes it itself. In my code that wraps your code I just make sure to create /var/run/kibana owned by my local kibana user and kibana writes the pid file there with no issues. This might not be backwards compatible with kibana versions that don't write the pid file though (i've been using your module to install kibana for the best part of last 8 months) |
I propose we delete these lines from # Generate the pidfile from here. If we instead made the forked process
# generate it there will be a race condition between the pidfile writing
# and a process possibly asking for status.
echo $! > $pidfile
chown $user:$group $pidfile @lesaux What do you think? |
Agreed, I am thinking of removing the whole init file template and just use the defaults provided by the package. This probably means abandoning a few features, but keeping up with the fast evolving kibana package is just too much effort. |
I've removed many parts of the module. I am using the default init.d script provided by the package. |
It looks like your latest change effectivelly kills installation from .tar.gz package? |
The convention over at Elastic.co has been to publish a matrix of module versions mapping to product versions, i.e. if you're stuck with one of the early Kibana 4 releases for which there were no packages, you'd use module version X etc. |
can you give a pointer or two toward that matrix? |
Regarding the pid issue: kibana 4.5.0 RPM installs identical init.d file which creates the pid file owned by root so if kibana service doesn't run as root, you are back to square one. My guess is that you should go back to managing the init templates. |
$user should be sourced from /etc/default/kibana. I'll be in front of a computer shortly to confirm, but what do you have in there. Are you sure the rpm overwrote the old files? |
rpm has it's own init script which is identical to the template you had. If you don't overwrite it you are back to the same issue |
If you don't specify
the init script should work. process will run as |
Looks like it. I will have to test it in my environment. In any case I might fork your code and add all the goodies I need (systemd for starters since all I do is on RHEL7.2) |
I think we should just keep all the old hacks and support for archive installation until Elastic.co release an RPM that works. |
@alexharv074: I think I disagree, a puppet module shouldn't be correcting software bugs. If we keep on fixing kibana problems in the puppet module, we are just delaying them from being accounted for upstream. @yuval-adar: systemd is the default on rhel7 since the last module release, although the rpm still installs an init file. Unfortunately kibana will log to /var/log/messages, and setting a pid file in kibana.yml still won't work. |
If the users of this module are blocked as a result of Elastic.co not fixing their RPM, they will just fork the module and implement their own workarounds. I don't see how that leads to more pressure on Elastic.co to fix their RPM. Do you know if there's an open issue about the PID file? I'll go and up vote it. |
@lesaux I understand the frustration of having to implement workarounds but this module is basically useless unless this PID file issue is fixed, and the previous behaviour is restored. |
"this module is basically useless" |
Would you like an assistant maintainer here? |
I'm facing this issue too. Just disabled
|
I just tried the new module (using tip of master) and the RPM 4.4.2, and unfortunately a PID file issue has returned. The bug seems to have been introduced in 014c177. The problematic code is:
This line runs as root, and therefore $pidfile is owned by root. The application, running as kibana, can't write to it.
I may send in a fix tomorrow.
The text was updated successfully, but these errors were encountered: