Fix getting timeout for get mounts facts on Linux (#79847)

* Fix how to get the gather_timeout setting while getting the
mounts facts on Linux.

Issue: #79844
This commit is contained in:
Geoffroy Doucet
2023-04-04 11:02:41 -04:00
committed by GitHub
parent 5e131a96c0
commit c1e19e4bdd
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- setup gather_timeout - Fix timeout in get_mounts_facts for linux.

View File

@@ -550,7 +550,7 @@ class LinuxHardware(Hardware):
# start threads to query each mount
results = {}
pool = ThreadPool(processes=min(len(mtab_entries), cpu_count()))
maxtime = globals().get('GATHER_TIMEOUT') or timeout.DEFAULT_GATHER_TIMEOUT
maxtime = timeout.GATHER_TIMEOUT or timeout.DEFAULT_GATHER_TIMEOUT
for fields in mtab_entries:
# Transform octal escape sequences
fields = [self._replace_octal_escapes(field) for field in fields]