{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack-formulas/docker-formula/issues/71","repository_url":"https://api.github.com/repos/saltstack-formulas/docker-formula","labels_url":"https://api.github.com/repos/saltstack-formulas/docker-formula/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/saltstack-formulas/docker-formula/issues/71/comments","events_url":"https://api.github.com/repos/saltstack-formulas/docker-formula/issues/71/events","html_url":"https://github.com/saltstack-formulas/docker-formula/issues/71","id":141230701,"number":71,"title":"Problem with reliably pulling docker containers after setting up docker","user":{"login":"LarsFronius","id":609378,"avatar_url":"https://avatars.githubusercontent.com/u/609378?v=3","gravatar_id":"","url":"https://api.github.com/users/LarsFronius","html_url":"https://github.com/LarsFronius","followers_url":"https://api.github.com/users/LarsFronius/followers","following_url":"https://api.github.com/users/LarsFronius/following{/other_user}","gists_url":"https://api.github.com/users/LarsFronius/gists{/gist_id}","starred_url":"https://api.github.com/users/LarsFronius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LarsFronius/subscriptions","organizations_url":"https://api.github.com/users/LarsFronius/orgs","repos_url":"https://api.github.com/users/LarsFronius/repos","events_url":"https://api.github.com/users/LarsFronius/events{/privacy}","received_events_url":"https://api.github.com/users/LarsFronius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-16T10:27:14Z","updated_at":"2016-03-16T10:27:14Z","closed_at":null,"body":"pillar data\r\n```\r\n{%- from \"foobar/shared_vars.jinja\" import shared_vars with context %}\r\ndocker-containers:\r\n  lookup:\r\n    ecs_agent:\r\n      image: \"amazon/amazon-ecs-agent:v1.7.1\"\r\n      runoptions:\r\n        - \"--detach=true\"\r\n        - \"--restart=on-failure:10\"\r\n        - \"--volume=/var/run/docker.sock:/var/run/docker.sock\"\r\n        - \"--volume=/var/log/ecs/:/log\"\r\n        - \"--volume=/var/lib/ecs/data:/data\"\r\n        - \"--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\r\n        - \"--volume=/var/run/docker/execdriver/native:/var/lib/docker/execdriver/native:ro\"\r\n        - \"--publish=127.0.0.1:51678:51678\"\r\n        - \"--env=ECS_LOGFILE=/log/ecs-agent.log\"\r\n        - \"--env=ECS_LOGLEVEL=info\"\r\n        - \"--env=ECS_DATADIR=/data\"\r\n        - \"--env=ECS_CLUSTER={{ grains.tags.cluster }}\"\r\n{% endif %}\r\n\r\ndocker-pkg:\r\n  lookup:\r\n    config:\r\n      - DOCKER_OPTS=\"{{ shared_vars.docker_opts }}\"\r\n    version: {{ shared_vars.docker_engine_version }}\r\n    install_docker_py: False\r\n```\r\nstate data\r\n```\r\ninclude:\r\n  - docker\r\n  - docker.containers\r\n```\r\nwhat we sometimes see in the logs:\r\n```\r\n[INFO    ] Completed state [docker] at time 10:17:12.994250\r\n[INFO    ] Running state [docker pull amazon/amazon-ecs-agent:v1.7.1] at time 10:17:12.995713\r\n[INFO    ] Executing state cmd.run for docker pull amazon/amazon-ecs-agent:v1.7.1\r\n[INFO    ] Executing command 'docker pull amazon/amazon-ecs-agent:v1.7.1' in directory '/root'\r\n[ERROR   ] Command 'docker pull amazon/amazon-ecs-agent:v1.7.1' failed with return code: 1\r\n[ERROR   ] stdout: Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/\r\n[ERROR   ] stderr: Cannot connect to the Docker daemon. Is the docker daemon running on this host?\r\n[ERROR   ] retcode: 1\r\n[ERROR   ] {'pid': 5775, 'retcode': 1, 'stderr': 'Cannot connect to the Docker daemon. Is the docker daemon running on this host?', 'stdout': 'Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/'}\r\n[INFO    ] Completed state [docker pull amazon/amazon-ecs-agent:v1.7.1] at time 10:17:13.046047\r\n```\r\nIt works mostly when I run salt again. so there seems to be a bit of time after docker is set up where the daemon is not reachable which imho the salt module should wait for."}}