mirror of
https://github.com/ansible/ansible.git
synced 2025-12-01 07:26:10 +07:00
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:
2
changelogs/fragments/79844-fix-timeout-mounts-linux.yml
Normal file
2
changelogs/fragments/79844-fix-timeout-mounts-linux.yml
Normal file
@@ -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
|
# start threads to query each mount
|
||||||
results = {}
|
results = {}
|
||||||
pool = ThreadPool(processes=min(len(mtab_entries), cpu_count()))
|
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:
|
for fields in mtab_entries:
|
||||||
# Transform octal escape sequences
|
# Transform octal escape sequences
|
||||||
fields = [self._replace_octal_escapes(field) for field in fields]
|
fields = [self._replace_octal_escapes(field) for field in fields]
|
||||||
|
|||||||
Reference in New Issue
Block a user