Browse Source

Merge "Change ssh_utils parameter to correctly send keepalive packets" into stable/ocata

changes/66/630966/2
Zuul 4 months ago
parent
commit
14bf24b231
1 changed files with 0 additions and 8 deletions
  1. 0
    8
      manila/utils.py

+ 0
- 8
manila/utils.py View File

@@ -108,16 +108,8 @@ class SSHPool(pools.Pool):
108 108
                         key_filename=self.path_to_private_key,
109 109
                         look_for_keys=look_for_keys,
110 110
                         timeout=self.conn_timeout)
111
-            # Paramiko by default sets the socket timeout to 0.1 seconds,
112
-            # ignoring what we set through the sshclient. This doesn't help for
113
-            # keeping long lived connections. Hence we have to bypass it, by
114
-            # overriding it after the transport is initialized. We are setting
115
-            # the sockettimeout to None and setting a keepalive packet so that,
116
-            # the server will keep the connection open. All that does is send
117
-            # a keepalive packet every ssh_conn_timeout seconds.
118 111
             if self.conn_timeout:
119 112
                 transport = ssh.get_transport()
120
-                transport.sock.settimeout(None)
121 113
                 transport.set_keepalive(self.conn_timeout)
122 114
             return ssh
123 115
         except Exception as e:

Loading…
Cancel
Save