Remove /var/run/elasticsearch from packages (#41102)
The pid dir for both systemd and init.d is already managed by those respective systems (tmpfiles.d and the init script, respectively). Since the /var/run dir is often mounted as tmpfs, it does not make sense to have the elasticsearch pid dir added by the package installation. This commit removes that empty dir from deb and rpm.
This commit is contained in:
parent
67d4e399c2
commit
cc867e8a5a
|
@ -81,7 +81,6 @@ void addProcessFilesTask(String type, boolean oss, boolean jdk) {
|
|||
|
||||
doLast {
|
||||
// create empty dirs, we set the permissions when configuring the packages
|
||||
mkdir "${packagingFiles}/var/run/elasticsearch"
|
||||
mkdir "${packagingFiles}/var/log/elasticsearch"
|
||||
mkdir "${packagingFiles}/var/lib/elasticsearch"
|
||||
mkdir "${packagingFiles}/usr/share/elasticsearch/plugins"
|
||||
|
@ -253,7 +252,6 @@ Closure commonPackageConfig(String type, boolean oss, boolean jdk) {
|
|||
dirMode mode
|
||||
}
|
||||
}
|
||||
copyEmptyDir('/var/run/elasticsearch', 'elasticsearch', 'elasticsearch', 0755)
|
||||
copyEmptyDir('/var/log/elasticsearch', 'elasticsearch', 'elasticsearch', 02750)
|
||||
copyEmptyDir('/var/lib/elasticsearch', 'elasticsearch', 'elasticsearch', 02750)
|
||||
copyEmptyDir('/usr/share/elasticsearch/plugins', 'root', 'root', 0755)
|
||||
|
|
|
@ -173,8 +173,6 @@ public class Packages {
|
|||
es.modules
|
||||
).forEach(dir -> assertThat(dir, file(Directory, "root", "root", p755)));
|
||||
|
||||
assertThat(es.pidDir, file(Directory, "elasticsearch", "elasticsearch", p755));
|
||||
|
||||
Stream.of(
|
||||
es.data,
|
||||
es.logs
|
||||
|
|
|
@ -47,7 +47,6 @@ export_elasticsearch_paths() {
|
|||
export ESCONFIG="/etc/elasticsearch"
|
||||
export ESDATA="/var/lib/elasticsearch"
|
||||
export ESLOG="/var/log/elasticsearch"
|
||||
export ESPIDDIR="/var/run/elasticsearch"
|
||||
export ESENVFILE=$(env_file)
|
||||
export PACKAGE_NAME=${PACKAGE_NAME:-"elasticsearch-oss"}
|
||||
}
|
||||
|
@ -132,7 +131,6 @@ verify_package_installation() {
|
|||
assert_file "$ESLOG" d elasticsearch elasticsearch 2750
|
||||
assert_file "$ESPLUGINS" d root root 755
|
||||
assert_file "$ESMODULES" d root root 755
|
||||
assert_file "$ESPIDDIR" d elasticsearch elasticsearch 755
|
||||
assert_file "$ESHOME/NOTICE.txt" f root root 644
|
||||
assert_file "$ESHOME/README.textile" f root root 644
|
||||
|
||||
|
|
Loading…
Reference in New Issue