mirror of https://github.com/ceph/ceph-ansible.git
Do not timeout podman/docker pull if timeout value is '0'
If user sets "docker_pull_timeout: '0'" then do not use the timeout command when running podman/docker pull. Also, use "timeout -s KILL"; without KILL, podman on RHEL8 beta does not timeout and deployment can hang. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1670625 Signed-off-by: John Fulton <fulton@redhat.com>pull/3559/head
parent
fe1528adb4
commit
cba9b23363
|
@ -176,8 +176,14 @@
|
|||
- nfs_group_name in group_names
|
||||
- ceph_nfs_container_inspect_before_pull.get('rc') == 0
|
||||
|
||||
- name: set_fact timeout_command
|
||||
set_fact:
|
||||
timeout_command: "{{ 'timeout -s KILL ' ~ docker_pull_timeout if (docker_pull_timeout != '0') else '' }}"
|
||||
when:
|
||||
- (ceph_docker_dev_image is undefined or not ceph_docker_dev_image)
|
||||
|
||||
- name: "pulling {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image"
|
||||
command: "timeout {{ docker_pull_timeout }} {{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||
command: "{{ timeout_command }} {{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||
changed_when: false
|
||||
register: docker_image
|
||||
until: docker_image.rc == 0
|
||||
|
|
Loading…
Reference in New Issue