Timeout not being honored in group.run()
Author: shepsterCreated Feb 19, 2025Updated Aug 10, 2026
LabelsBugNeeds investigationGroup
Describe the bug
Passing group.run(timeout=5) does not change default timeout of 60 seconds
To Reproduce The following code
#!/usr/bin/python3
import fabric
group = fabric.ThreadingGroup('boss1', 'boss4')
try:
results = group.run('uname -nsr', hide=True, timeout=5)
except fabric.exceptions.GroupException as err:
results = err.result
for _connection, _result in results.items():
if hasattr(_result, 'stdout'):
print(f'{_connection.host}: {_result.stdout.strip()}')
else:
print(f'{_connection.host}: {_result}')Produces the result
boss1: Linux boss1 4.14.355-275.582.amzn2.x86_64
boss4: [Errno 60] Operation timed outThe timeout is 60 seconds, and not the specified timeout=5
Expected behaviour The code should timeout in the specified 5 seconds
Environment Python 3.9.6 fabric.version='3.2.2' macOS Sonoma 14.7.4
Source: fabric/fabric