|
From: | Shoham Peller |
Subject: | [Fab-user] Feature request - don't use cache |
Date: | Wed, 10 Dec 2014 22:14:38 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Hello everyone, Thank you for building and maintaining such useful and well-done code package. I'm using fabric to connect to my virtual machines. But every time I'm reverting a machine, fabric fails because it caches it's connections (see traceback at the bottom) If I'm to explain by the code, in fabric/network.py, line 158, fabric checks if a connection to the requested address was already made, use that same session. But if my VM was reverted, the session is not synced and I need fabric to re-connect. So is there a way to force fabric to ignore or empty the cache, or maybe to try again if the connection was unsuccessful? Thank you all again, Shoham ______________________________________________________________________________________________________________________________________________________________ Traceback (most recent call last): File "/home/shoham/main.py", line 80, in <module> main() File "/home/shoham/main.py", line 68, in main execute(task) File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 424, in execute results['<local-only>'] = task.run(*args, **new_kwargs) File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 174, in run return self.wrapped(*args, **kwargs) File "/home/shoham/test_mockup.py", line 11, in test_with_file_upload put("/home/shoham/Vagrantfile", "/tmp") File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 647, in host_prompting_wrapper return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 346, in put ftp = SFTP(env.host_string) File "/usr/local/lib/python2.7/dist-packages/fabric/sftp.py", line 30, in __init__ self.ftp = connections[host_string].open_sftp() File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 379, in open_sftp return self._transport.open_sftp_client() File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 811, in open_sftp_client return SFTPClient.from_transport(self) File "/usr/local/lib/python2.7/dist-packages/paramiko/sftp_client.py", line 127, in from_transport max_packet_size=max_packet_size) File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 615, in open_session max_packet_size=max_packet_size) File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 696, in open_channel raise SSHException('SSH session not active') paramiko.ssh_exception.SSHException: SSH session not active |
[Prev in Thread] | Current Thread | [Next in Thread] |