Skip to content

Commit

Permalink
Add configurable docker cgroupdriver
Browse files Browse the repository at this point in the history
Some distros docker packaging use systemd instead of cgroupfs as the
cgroupdriver. This patch allows users to choose their cgroupdriver.

Change-Id: I95b51591d0aa5495ec583c3c87c77942109b4067
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
  • Loading branch information
celebdor committed Oct 27, 2017
1 parent 718e499 commit f3c2d30
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions devstack/lib/docker
Expand Up @@ -25,6 +25,7 @@ DOCKER_ENGINE_SOCKET_FILE=${DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
DOCKER_ENGINE_PORT=${DOCKER_ENGINE_PORT:-2375}
DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-}
DOCKER_GROUP=${DOCKER_GROUP:-$STACK_USER}
DOCKER_CGROUP_DRIVER=${DOCKER_CGROUP_DRIVER:-}


# Functions
Expand Down Expand Up @@ -95,6 +96,15 @@ function configure_docker {
$cluster_store_opts
"debug": ${debug},
"group": "$DOCKER_GROUP",
EOF
if [[ -n "$DOCKER_CGROUP_DRIVER" ]]; then

cat <<EOF | sudo tee -a $docker_config_file >/dev/null
"exec-opts": ["native.cgroupdriver=${DOCKER_CGROUP_DRIVER}"],
EOF
fi

cat <<EOF | sudo tee -a $docker_config_file >/dev/null
"hosts": [
"unix://$DOCKER_ENGINE_SOCKET_FILE",
"tcp://0.0.0.0:$DOCKER_ENGINE_PORT"
Expand Down

0 comments on commit f3c2d30

Please sign in to comment.