From 08e54d7722c38d5f214e502f71c781e990c4bfd2 Mon Sep 17 00:00:00 2001 From: Ivan Font Date: Thu, 28 Jul 2016 17:13:45 -0700 Subject: [PATCH] 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 --- roles/ceph-mds/tasks/docker/main.yml | 2 +- roles/ceph-osd/tasks/docker/main.yml | 2 +- roles/ceph-rbd-mirror/tasks/docker/main.yml | 2 +- roles/ceph-rgw/tasks/docker/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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