Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Add hack for obtaining cgroup stats
Browse files Browse the repository at this point in the history
Docker mounts cgroup stats in the wrong place (i.e., inconsistently with
the hierarchy in /proc/1/cgroup). This breaks the logic for traversing
from /proc/self/cgroup to the stats for a process running inside a
container. In core Elasticsearch, an undocumented hack was added to
support this, for now. Thus, for cgroup stats to be available from
Elasticsearch running inside a Docker container, the Elasticsearch
process should be started with `-Des.cgroups.hierarchy.override=/`. This
commit adds support for this hack.
  • Loading branch information
jasontedor committed Jan 24, 2017
1 parent f085bef commit 67fd123
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/elasticsearch/bin/es-docker
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ do
fi
done < <(env)

echo "-Des.cgroups.hierarchy.override=/" >> config/jvm.options

exec bin/elasticsearch ${es_opts}

0 comments on commit 67fd123

Please sign in to comment.