File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 4848# is idempotent.
4949source /usr/share/elasticsearch/bin/elasticsearch-env-from-file
5050
51- # The virtual file /proc/self/cgroup should list the current cgroup
52- # membership. For each hierarchy, you can follow the cgroup path from
53- # this file to the cgroup filesystem (usually /sys/fs/cgroup/) and
54- # introspect the statistics for the cgroup for the given
55- # hierarchy. Alas, Docker breaks this by mounting the container
56- # statistics at the root while leaving the cgroup paths as the actual
57- # paths. Therefore, Elasticsearch provides a mechanism to override
58- # reading the cgroup path from /proc/self/cgroup and instead uses the
59- # cgroup path defined the JVM system property
60- # es.cgroups.hierarchy.override. Therefore, we set this value here so
61- # that cgroup statistics are available for the container this process
62- # will run in.
63- export ES_JAVA_OPTS=" -Des.cgroups.hierarchy.override=/ $ES_JAVA_OPTS "
64-
6551if [[ -f bin/elasticsearch-users ]]; then
6652 # Check for the ELASTIC_PASSWORD environment variable to set the
6753 # bootstrap password for Security.
Original file line number Diff line number Diff line change @@ -117,6 +117,20 @@ if [[ "$ES_DISTRIBUTION_TYPE" == "docker" ]]; then
117117
118118 # Reset the positional parameters to the es_arg_array values and any existing positional params
119119 set -- " $@ " " ${es_arg_array[@]} "
120+
121+ # The virtual file /proc/self/cgroup should list the current cgroup
122+ # membership. For each hierarchy, you can follow the cgroup path from
123+ # this file to the cgroup filesystem (usually /sys/fs/cgroup/) and
124+ # introspect the statistics for the cgroup for the given
125+ # hierarchy. Alas, Docker breaks this by mounting the container
126+ # statistics at the root while leaving the cgroup paths as the actual
127+ # paths. Therefore, Elasticsearch provides a mechanism to override
128+ # reading the cgroup path from /proc/self/cgroup and instead uses the
129+ # cgroup path defined the JVM system property
130+ # es.cgroups.hierarchy.override. Therefore, we set this value here so
131+ # that cgroup statistics are available for the container this process
132+ # will run in.
133+ export ES_JAVA_OPTS=" -Des.cgroups.hierarchy.override=/ $ES_JAVA_OPTS "
120134fi
121135
122136cd " $ES_HOME "
You can’t perform that action at this time.
0 commit comments