Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osm_vector_maps was repeatedly failing to install, so use 'timeout: "{{ download_timeout }}"' with get_url (in 10 roles!) [& change IIAB's 'download_timeout: 200' to 100 sec] #3083

Merged
merged 3 commits into from
Dec 26, 2021

Conversation

holta
Copy link
Member

@holta holta commented Dec 26, 2021

IIAB's OpenStreetMap installer (osm-vector-maps/tasks/install.yml) is very fragile when GitHub and/or your ISP (Internet) is overwhelmed.

As I discovered repeatedly yesterday, the problem is especially acute when trying to install osm-vector-maps as a result of this role downloading so many different files.

This PR fixes the problem, by avoiding Ansible's default timeout for get_url: of 10 seconds, and using 100 seconds instead.

This PR also establishes 'timeout: "{{ download_timeout }}"' essentially across the board, for almost all of repo iiab/iiab's ~50 uses of get_url, as this was missing from almost 10 roles.

The exception (where we do not want to use timeout: "{{ download_timeout }}") is:

- name: 'Test for Internet access, using: {{ iiab_download_url }}/heart-beat.txt'
get_url:
url: "{{ iiab_download_url }}/heart-beat.txt"
dest: /tmp/heart-beat.txt
#timeout: "{{ download_timeout }}"
# @jvonau recommends: 100sec is too much (keep 10sec default)
ignore_errors: True
#async: 10
#poll: 2
register: internet_access_test

Note that the Internet is comparatively more stable in major cities around the world in 2021, as compared to 5 years ago, so this PR also lowers download_timeout: 200 to download_timeout: 100 (seconds), to try to avoid pointlessly frustrating delays.

In future years we (might!) possibly want to further lower this IIAB setting (in default_vars.yml etc) from 100 seconds, down to 60 seconds or so?

Tangentially related:

@holta holta added this to the 7.2 milestone Dec 26, 2021
@holta holta changed the title osm_vector_maps was repeatedly failing to install, so use 'timeout: "{{ download_timeout }}"' with get_url (in 10 roles!) osm_vector_maps was repeatedly failing to install, so use 'timeout: "{{ download_timeout }}"' with get_url (in 10 roles!) [& change IIAB's 'download_timeout: 200' to 100 sec] Dec 26, 2021
@holta holta added the question label Dec 26, 2021
@holta
Copy link
Member Author

holta commented Dec 26, 2021

This PR was tested over the past 2 hours with a LARGE-sized install on RasPiOS 11 on RPi 4.

All looks great.

This should help make IIAB installs substantially more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant