Browse Source

[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
changes/90/601590/1
Jiri Stransky 3 years ago
parent
commit
78358da44f
  1. 8
      puppet/services/docker.yaml

8
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

Loading…
Cancel
Save