]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
container: restart container when there is a new image
authorSébastien Han <seb@redhat.com>
Fri, 15 Dec 2017 18:43:23 +0000 (19:43 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 11 Jan 2018 16:22:28 +0000 (17:22 +0100)
commit57cd79b1874c2c8b09c81707e5cf25c9c2eeb2de
tree97c9c54483b954fed0ffc6ad5022fe5b6eac0525
parent704b55e5c2742f4082861a58161453b2597ea0a8
container: restart container when there is a new image

This wasn't any good choice to implement this.
We had several options and none of them were ideal since handlers can
not be triggered cross-roles.
We could have achieved that by doing:

* option 1 was to add a dependancy in the meta of the ceph-docker-common
role. We had that long ago and we decided to stop so everything is
managed via site.yml

* option 2 was to import files from another role. This is messy and we
don't that anywhere in the current code base. We will continue to do so.

There is option 3 where we pull the image from the ceph-config role.
This is not suitable as well since the docker command won't be available
unless you run Atomic distro. This would also mean that you're trying to
pull twice. First time in ceph-config, second time in ceph-docker-common

The only option I came up with was to duplicate a bit of the ceph-config
handlers code.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1526513
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 8a19a83354cd8a4f9a729b3864850ec69be6d5da)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-docker-common/handlers/main.yml [new file with mode: 0644]
roles/ceph-docker-common/tasks/check_socket_container.yml [new file with mode: 0644]
roles/ceph-docker-common/tasks/fetch_image.yml
roles/ceph-docker-common/tasks/main.yml