|
From: | Liu, Bohan |
Subject: | [Fab-user] fabric.operations.run NEVER return for long running remote process |
Date: | Thu, 18 Sep 2014 03:44:00 +0000 |
Here is my case:
I have a simple bash script only does “sleep 3600” on remote host (Amazon EC2) and I am using fabric to call it via fabric.operations.run (I did NOT set any env.timeout or env.command_timeout).
If the remote bash script sleeps for 3600 seconds, fabric was NOT able to return after the bash script is done running. I printed the stack trace and it kept waiting on `channel.exits_status_ready()` (https://github.com/fabric/fabric/blob/master/fabric/operations.py LINE:
794) even if the script already returned.
This ONLY happens for long running process. I tried to make bash script sleep for 120 seconds and it worked fine.
I double checked the open connections using netstat, and the ssh session opened by fabric was still alive.
Help needed :) Any idea why this happens?
Thanks,
Bohan
|
[Prev in Thread] | Current Thread | [Next in Thread] |