dnf-json: use the default connection timeout

By default `timeout` is 30 seconds, but we had it set to 5. Drop
the override and use the default.

This has two effects: it increases the time before we give up on
connecting (as it says on the tin), and it also increases the time
download has to be slow for before we give up.

Internally, we were seing failures in downlaoding metadata from ODCS
and similar issues have occurred in CI too.

The potential downside to this is in case of having several mirrors
this means it takes longer before giving up on a bad one and trying
a better one. But slow is better than broken, so for now rever to
the default behavior.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2022-03-11 15:58:36 +01:00 committed by Ondřej Budai
parent 562225af4c
commit 2a4d4c4d49

View file

@ -118,9 +118,6 @@ class Solver():
# building images, I don't care if we download even more.
self.base.conf.zchunk = False
# Try another mirror if it takes longer than 5 seconds to connect.
self.base.conf.timeout = 5
# Set the rest of the dnf configuration.
self.base.conf.module_platform_id = module_platform_id
self.base.conf.config_file_path = "/dev/null"