diff --git a/ansible/roles/docker/defaults/main.yml b/ansible/roles/docker/defaults/main.yml index c7c920db9..e45795d91 100644 --- a/ansible/roles/docker/defaults/main.yml +++ b/ansible/roles/docker/defaults/main.yml @@ -34,6 +34,9 @@ docker_registry_ca: # MTU to pass through to containers not using net=host docker_daemon_mtu: 1500 +# Enable live-restore on docker daemon +docker_daemon_live_restore: true + # Upper constraints file which is passed to pip when installing packages # into a venv. docker_upper_constraints_file: diff --git a/ansible/roles/docker/templates/daemon.json.j2 b/ansible/roles/docker/templates/daemon.json.j2 index 0df640d7c..c7afa0632 100644 --- a/ansible/roles/docker/templates/daemon.json.j2 +++ b/ansible/roles/docker/templates/daemon.json.j2 @@ -2,6 +2,9 @@ "storage-driver": "{% if docker_storage_driver == 'devicemapper' %}devicemapper{% else %}overlay{% endif %}", {% if docker_daemon_mtu %} "mtu": {{ docker_daemon_mtu }}, +{% endif %} +{% if docker_daemon_live_restore %} + "live-restore": {{ docker_daemon_live_restore | to_json }}, {% endif %} "storage-opts": [ {% if docker_storage_driver == 'devicemapper' %} diff --git a/doc/source/release-notes.rst b/doc/source/release-notes.rst index 57004dc6b..bc2c6425f 100644 --- a/doc/source/release-notes.rst +++ b/doc/source/release-notes.rst @@ -10,6 +10,9 @@ Features * Adds support for configuration of custom repositories. ``yum_custom_repos`` should be a dict of repositories. +* Adds support for configuration of live-restore option in docker. This is + enabled by setting the variable ``docker_daemon_live_restore``. Option is + set to true by default. Upgrade Notes ------------- diff --git a/etc/kayobe/docker.yml b/etc/kayobe/docker.yml index 6f92d0121..6ee82d530 100644 --- a/etc/kayobe/docker.yml +++ b/etc/kayobe/docker.yml @@ -28,6 +28,9 @@ # CA of docker registry #docker_registry_ca: +# Enable live-restore on docker daemon +#docker_daemon_live_restore: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes