From 78358da44f37cd455421677d5b123668bc2efa33 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Tue, 11 Sep 2018 14:41:22 +0200 Subject: [PATCH] [Queens] Don't stop docker on config changes This will allow us to take advantage of the Docker live restore option, and not restart all containers during minor update on small docker config changes. The containers will be restarted only in case Docker RPM is updated during the minor update. If we ship a config change which wouldn't work well with live restore, we'll need to re-enable the restarts on config change. Docker documentation does not specify which config options are safe to change and which aren't. Change-Id: I97cd28a7e1dfc1bec943754fbf42519b6f563da6 Closes-Bug: #1777146 --- puppet/services/docker.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/puppet/services/docker.yaml b/puppet/services/docker.yaml index 242e7fa60b..71ab3d6012 100644 --- a/puppet/services/docker.yaml +++ b/puppet/services/docker.yaml @@ -142,12 +142,16 @@ outputs: # xargs is preferable to docker stop $(docker ps -q) as that might generate a # a too long command line shell: docker ps -q | xargs --no-run-if-empty -n1 docker stop - when: puppet_docker_is_outofsync or docker_rpm_needs_update + # If we ship a config change which requires docker restart, change the when condition: + # when: puppet_docker_is_outofsync or docker_rpm_needs_update + when: docker_rpm_needs_update - name: Stop docker service: name: docker state: stopped - when: puppet_docker_is_outofsync or docker_rpm_needs_update + # If we ship a config change which requires docker restart, change the when condition: + # when: puppet_docker_is_outofsync or docker_rpm_needs_update + when: docker_rpm_needs_update - name: Update the docker package yum: name=docker state=latest update_cache=yes # cache for tripleo/+bug/1703830 when: docker_rpm_needs_update