From: Ivan Font Date: Fri, 29 Jul 2016 00:13:45 +0000 (-0700) Subject: Fix to check if cluster is running X-Git-Tag: v1.0.6~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F912%2Fhead;p=ceph-ansible.git Fix to check if cluster is running Update each role's task to use the respective role's username, image name, and image tag to check if a container is already running. This was causing false failures because we were not matching any running containers and subsequently running checks.yml to check the status of cluster files being left behind. Signed-off-by: Ivan Font --- diff --git a/roles/ceph-mds/tasks/docker/main.yml b/roles/ceph-mds/tasks/docker/main.yml index bfe86f39d..0c42388ea 100644 --- a/roles/ceph-mds/tasks/docker/main.yml +++ b/roles/ceph-mds/tasks/docker/main.yml @@ -1,6 +1,6 @@ --- - name: check if a cluster is already running - shell: "docker ps | grep -sq 'ceph/daemon'" + shell: "docker ps | grep -sq '{{ceph_mds_docker_username}}/{{ceph_mds_docker_imagename}}:{{ceph_mds_docker_image_tag}}'" register: ceph_health changed_when: false failed_when: false diff --git a/roles/ceph-osd/tasks/docker/main.yml b/roles/ceph-osd/tasks/docker/main.yml index 6db55a173..41e68785e 100644 --- a/roles/ceph-osd/tasks/docker/main.yml +++ b/roles/ceph-osd/tasks/docker/main.yml @@ -1,6 +1,6 @@ --- - name: check if a cluster is already running - shell: "docker ps | grep -sq 'ceph/daemon'" + shell: "docker ps | grep -sq '{{ceph_osd_docker_username}}/{{ceph_osd_docker_imagename}}:{{ceph_osd_docker_image_tag}}'" register: ceph_health changed_when: false failed_when: false diff --git a/roles/ceph-rbd-mirror/tasks/docker/main.yml b/roles/ceph-rbd-mirror/tasks/docker/main.yml index a9b6df218..886beca75 100644 --- a/roles/ceph-rbd-mirror/tasks/docker/main.yml +++ b/roles/ceph-rbd-mirror/tasks/docker/main.yml @@ -1,6 +1,6 @@ --- - name: check if a cluster is already running - shell: "docker ps | grep -sq 'ceph/daemon'" + shell: "docker ps | grep -sq '{{ceph_rbd_mirror_docker_username}}/{{ceph_rbd_mirror_docker_imagename}}:{{ceph_rbd_mirror_docker_image_tag}}'" register: ceph_health changed_when: false failed_when: false diff --git a/roles/ceph-rgw/tasks/docker/main.yml b/roles/ceph-rgw/tasks/docker/main.yml index d94ac3964..787a4fdcc 100644 --- a/roles/ceph-rgw/tasks/docker/main.yml +++ b/roles/ceph-rgw/tasks/docker/main.yml @@ -1,6 +1,6 @@ --- - name: check if a cluster is already running - shell: "docker ps | grep -sq 'ceph/daemon'" + shell: "docker ps | grep -sq '{{ceph_rgw_docker_username}}/{{ceph_rgw_docker_imagename}}:{{ceph_rgw_docker_image_tag}}'" register: ceph_health changed_when: false failed_when: false