Skip to content

Commit

Permalink
Restart rather than reload docker.
Browse files Browse the repository at this point in the history
state=reloaded doesn't actually have any effect on a running
docker process in ubuntu 14.04. In particular, the /etc/init.d/docker
start script does not execute, so any customised storage options will
not be applied to the running docker process which may result in
a big surprise when the daemon is eventually restarted and images
added to the loopback thin pool device are no longer accessible in
the configured thinpool device.

This change removes the "Reload docker" handler and changes the pre 15.04
handler to use "Restart docker" instead.
  • Loading branch information
jonseymour committed Mar 30, 2016
1 parent 87e831e commit b9bed7e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
- name: Start Docker
service: name=docker state=started

- name: Reload docker
service: name=docker state=reloaded

- name: Reload systemd
command: systemctl daemon-reload

Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
group: root
mode: 0644
notify:
- Reload docker
- Restart docker
when: docker_opts != "" and ansible_distribution_version|version_compare(15.04, '<')

- name: Create systemd configuration directory for Docker service (systemd)
Expand Down

0 comments on commit b9bed7e

Please sign in to comment.