Support live_restore for keeping all running containers
Change-Id: I5ca480bab5cb402dd7bd29f78dd8b6a639060fcf
This commit is contained in:
parent
83acf1400e
commit
54aa82d99f
|
@ -27,6 +27,7 @@ DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-}
|
|||
DOCKER_GROUP=${DOCKER_GROUP:-$STACK_USER}
|
||||
DOCKER_CGROUP_DRIVER=${DOCKER_CGROUP_DRIVER:-}
|
||||
ENABLE_CLEAR_CONTAINER=$(trueorfalse False ENABLE_CLEAR_CONTAINER)
|
||||
ENABLE_LIVE_RESTORE=$(trueorfalse False ENABLE_LIVE_RESTORE)
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
|
@ -108,17 +109,24 @@ function configure_docker {
|
|||
fi
|
||||
local docker_config_file=/etc/docker/daemon.json
|
||||
local debug
|
||||
local live_restore
|
||||
if [[ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]]; then
|
||||
debug=true
|
||||
else
|
||||
debug=false
|
||||
fi
|
||||
if [[ "$ENABLE_LIVE_RESTORE" == "True" ]]; then
|
||||
live_restore=true
|
||||
else
|
||||
live_restore=false
|
||||
fi
|
||||
sudo mkdir -p $(dirname ${docker_config_file})
|
||||
cat <<EOF | sudo tee $docker_config_file >/dev/null
|
||||
{
|
||||
$cluster_store_opts
|
||||
$runtime_opts
|
||||
"debug": ${debug},
|
||||
"live-restore": ${live_restore},
|
||||
"group": "$DOCKER_GROUP",
|
||||
EOF
|
||||
if [[ -n "$DOCKER_CGROUP_DRIVER" ]]; then
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker}
|
||||
ENABLE_CLEAR_CONTAINER=${ENABLE_CLEAR_CONTAINER:-false}
|
||||
ENABLE_LIVE_RESTORE=${ENABLE_LIVE_RESTORE:-false}
|
||||
|
||||
# Enable container services
|
||||
enable_service container
|
||||
|
|
Loading…
Reference in New Issue