diff --git a/module_build_service/config.py b/module_build_service/config.py index ba702e2a..6bffc751 100644 --- a/module_build_service/config.py +++ b/module_build_service/config.py @@ -661,7 +661,12 @@ class Config(object): "desc": "The minrate configuration on a DNF repo. This configuration will cause DNF to " "timeout loading a repo if the download speed is below minrate for the " "duration of the timeout." - } + }, + "dnf_timeout": { + "type": int, + "default": 30, + "desc": "The timeout configuration for dnf operations, in seconds." + }, } def __init__(self, conf_section_obj): diff --git a/module_build_service/scheduler/default_modules.py b/module_build_service/scheduler/default_modules.py index 44ab7cb4..a355f60a 100644 --- a/module_build_service/scheduler/default_modules.py +++ b/module_build_service/scheduler/default_modules.py @@ -366,6 +366,7 @@ def _get_rpms_in_external_repo(repo_url, arches, cache_dir_name): dnf_conf.cachedir = cache_location # Don't skip repos that can't be synchronized dnf_conf.skip_if_unavailable = False + dnf_conf.timeout = conf.dnf_timeout # Get rid of everything to be sure it's a blank slate. This doesn't delete the cached repo data. base.reset(repos=True, goal=True, sack=True)