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
pull/80407/head
Geoffroy Doucet 1 year ago committed by GitHub
parent 5e131a96c0
commit c1e19e4bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -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]

Loading…
Cancel
Save