From b9bed7e0c8f6710b604d390cfde0113ff76e12b8 Mon Sep 17 00:00:00 2001 From: Jon Seymour Date: Wed, 30 Mar 2016 12:44:09 +1100 Subject: [PATCH] Restart rather than reload docker. 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. --- handlers/main.yml | 3 --- tasks/main.yml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 6964b7c..5c45210 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index 2a05d4c..976045b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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)