我正在按照以下任务异步构建和归档docker映像:
- name: pull_and_build_images.yml -> Build my_config image
docker_image:
path: "{{ temp_build_directory }}/configurators/my_config/"
name: my_config
tag: latest
pull: no
push: no
archive_path: "{{ temp_build_directory }}/images/my_conf.gz"
async: 10000
poll: 0
register: my_configurator_build
然后轮询结果:
- name: wait_pull_and_build_images.yml -> Await build MY_CONFIGURATOR
async_status:
jid: "{{ my_configurator_build.ansible_job_id }}"
register: my_configurator_build_result
until: my_configurator_build_result.finished
retries: 150
该过程随机有时会失败,并出现以下错误:
TASK [prepare_images : wait_pull_and_build_images.yml -> Await build MY_CONFIGURATOR] ************************************************************************************************************************
fatal: [builder_hostname]: FAILED! => {"ansible_job_id": "90333106176.17981", "attempts": 1, "changed": false, "finished": 1, "msg": "Error getting image ess_configurator:latest - UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)"}
这可能是什么原因?