Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate keepalive control #1807

Open
bitprophet opened this issue Jun 19, 2018 · 5 comments
Open

Reinstate keepalive control #1807

bitprophet opened this issue Jun 19, 2018 · 5 comments

Comments

@bitprophet
Copy link
Member

v1 had a simple integer env.keepalive / --keepalive that got turned into client.get_transport().set_keepalive(xxx); v2 has not ported that over yet.

@dgskwirut
Copy link

Any update on if this can be ported soon? Seems like a simple fix.

@rdenham
Copy link

rdenham commented Feb 14, 2020

I'd also like this to be implemented.

@grokpot
Copy link

grokpot commented Apr 21, 2020

How would one implement this functionality currently with Fabric2? Or, is it even possible?

@cr-liadsh
Copy link

cr-liadsh commented Apr 25, 2020

This might be a dirty workaround, but it might be possible to set the timeout this way:
from fabric2 import Connection
c = Connection(host="1.2.3.4", user="user", connect_kwargs={"key_filename": "my_key"}
c.run("echo hey")
c.transport.set_keepalive(<keepalive>)

I didn't find a different way to set keepalive with fabric2 at the moment ):

@ibrahimasow1
Copy link

@cr-liadsh thank you for your workaround!
I was stuck for weeks and couldn't figure out why my commands were hanging. Setting the keep alive allowed me to get the command's result.
The port of Fabric v1's keepalive to Fabric v2 is still pending, so I will keep using your fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants