[test] Run bin/plugin as right user

Before this commit he tests always run bin/plugin as root which is somewhat
unrealistic and causes trouble (log files owned by root instead of
elasticsearch). After this commit `bin/plugin` runs as root when elasticsearch
is installed via the repository and as elasticsearch otherwise which is much
more realistic.

This also adds extra timeout to starting elasticsearch which is required
when all the plugins are installed. And it fixes up a problem with logging
elasticsearch's log if elasticsearch doesn't start which came up multiple
time while debugging this problem.

Also adds docs recommending running `bin/plugin` as the user that owns the
Elasticsearch files or root if installed with the packages.

Closes #13557
This commit is contained in:
Nik Everett 2015-09-15 11:33:39 -04:00
parent a1e83f6f4f
commit b521c606ff
5 changed files with 34 additions and 12 deletions

View file

@ -13,6 +13,15 @@ Run the following command to get usage instructions:
sudo bin/plugin -h
-----------------------------------
[IMPORTANT]
.Running as root
=====================
If Elasticsearch was installed using the deb or rpm package then run
`bin/plugin` as `root` so it can write to the appropriate files on disk.
Otherwise run `bin/plugin` as the user that owns all of the Elasticsearch
files.
=====================
[[installation]]
=== Installing Plugins
@ -222,4 +231,3 @@ plugin.mandatory: mapper-attachments,lang-groovy
--------------------------------------------------
For safety reasons, a node will not start if it is missing a mandatory plugin.