fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Feature request - don't use cache


From: Shoham Peller
Subject: Re: [Fab-user] Feature request - don't use cache
Date: Thu, 11 Dec 2014 00:11:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Excellent I didn't know that.

But there is still a problem - fabric only calls disconnect_all() if env.eagerly_disconnect==False AND env.all_hosts!=[], and all_hosts is always an empty list..

On 12/10/2014 11:31 PM, Brandon Whaley wrote:
Hey Shoham, see if env.eagerly_disconnect=True works for you:
http://docs.fabfile.org/en/1.10/usage/env.html?highlight=eagerly_disconnect#eagerly-disconnect

On Wed, Dec 10, 2014 at 3:14 PM, Shoham Peller <address@hidden> wrote:
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

_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user


    


reply via email to

[Prev in Thread] Current Thread [Next in Thread]