Revert "Add wait command for docker images"
This reverts commit e3f18c490e6812413d5ec6f7c5bd711ff95f6bd2.
Closes-bug: #PROD-25917 (PROD:25917)
Change-Id: Id6d9e0c40d83e61bef1409b7836fc1c423878582
diff --git a/docker/client/stack.sls b/docker/client/stack.sls
index 4698d21..b7bac65 100644
--- a/docker/client/stack.sls
+++ b/docker/client/stack.sls
@@ -3,12 +3,6 @@
include:
- docker.client
-docker_compose_image_checker:
- file.managed:
- - name: /usr/local/bin/docker-compose-image-checker
- - source: salt://docker/files/docker-compose-image-checker
- - mode: 755
-
{%- for app, compose in client.stack.iteritems() %}
{%- if compose.service is defined %}
@@ -128,21 +122,6 @@
- file: docker_{{ app }}_env
- file: docker_{{ app }}_compose
-docker_stack_{{ app }}_wait_for_images:
- cmd.wait:
- - name: /usr/local/bin/docker-compose-image-checker {{ app }}
- - retry:
- attempts: {{ compose.image_pull_attempts|default(30) }}
- interval: 10
- until: True
- - shell: /bin/bash
- - user: {{ compose.user|default("root") }}
- - require:
- - cmd: docker_stack_{{ app }}
- - file: docker_compose_image_checker
- - watch:
- - file: docker_{{ app }}_compose
-
{%- else %}
docker_remove_{{ app }}:
diff --git a/docker/files/docker-compose-image-checker b/docker/files/docker-compose-image-checker
deleted file mode 100755
index e51f448..0000000
--- a/docker/files/docker-compose-image-checker
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# =================================================
-# This file is managed by SaltStack docker formula.
-# Manual changes may be overwritten.
-# =================================================
-#
-# This script verifies that images for dedicated stack were
-# pulled from docker registry. First argument is stack name.
-
-STACK_NAME=$1
-if [ -z "${STACK_NAME}" ]; then echo "STACK_NAME is not provided"; exit 1; fi
-
-IMAGES=$(docker stack ps ${STACK_NAME} --format "{{.Image}}" | awk -F ':' '{print $1}' | uniq);
-NOT_PULLED=""
-for image in ${IMAGES}; do
- exist=$(docker images --format "{{if eq .Repository \"$image\"}}{{.Repository}}{{end}}");
- if [ -z "${exist}" ]; then
- NOT_PULLED="${NOT_PULLED} ${image}"
- fi;
-done
-
-if [ -n "${NOT_PULLED}" ]; then
- echo "Images ${NOT_PULLED} do not exist";
- exit 1;
-fi
\ No newline at end of file