redisbench-admin 0.11.15__py3-none-any.whl → 0.11.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redisbench_admin/utils/remote.py +31 -5
- {redisbench_admin-0.11.15.dist-info → redisbench_admin-0.11.16.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.15.dist-info → redisbench_admin-0.11.16.dist-info}/RECORD +6 -6
- {redisbench_admin-0.11.15.dist-info → redisbench_admin-0.11.16.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.11.15.dist-info → redisbench_admin-0.11.16.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.11.15.dist-info → redisbench_admin-0.11.16.dist-info}/entry_points.txt +0 -0
redisbench_admin/utils/remote.py
CHANGED
|
@@ -158,15 +158,41 @@ def execute_remote_commands(
|
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
def connect_remote_ssh(port, private_key, server_public_ip, username):
|
|
161
|
+
import time
|
|
162
|
+
|
|
161
163
|
k = paramiko.RSAKey.from_private_key_file(private_key)
|
|
162
164
|
c = paramiko.SSHClient()
|
|
163
165
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
|
|
167
|
+
max_retries = 10
|
|
168
|
+
base_delay = 2 # Initial backoff time in seconds
|
|
169
|
+
max_delay = 90 # Maximum delay in seconds
|
|
170
|
+
|
|
171
|
+
for attempt in range(max_retries):
|
|
172
|
+
try:
|
|
173
|
+
logging.info(
|
|
174
|
+
f"Connecting to remote server {server_public_ip}, attempt {attempt + 1}"
|
|
175
|
+
)
|
|
176
|
+
c.connect(
|
|
177
|
+
hostname=server_public_ip,
|
|
178
|
+
port=port,
|
|
179
|
+
username=username,
|
|
180
|
+
pkey=k,
|
|
181
|
+
timeout=300,
|
|
182
|
+
)
|
|
183
|
+
logging.info(f"Connected to remote server {server_public_ip}")
|
|
184
|
+
return c
|
|
185
|
+
except paramiko.ssh_exception.NoValidConnectionsError as e:
|
|
186
|
+
wait_time = min(base_delay * (2**attempt), max_delay)
|
|
187
|
+
logging.warning(
|
|
188
|
+
f"Connection attempt {attempt + 1} failed: {e}. Retrying in {wait_time} seconds..."
|
|
189
|
+
)
|
|
190
|
+
time.sleep(wait_time)
|
|
191
|
+
|
|
192
|
+
logging.error("Failed to connect after multiple attempts.")
|
|
193
|
+
raise paramiko.ssh_exception.NoValidConnectionsError(
|
|
194
|
+
f"Could not connect to {server_public_ip} after {max_retries} attempts."
|
|
167
195
|
)
|
|
168
|
-
logging.info("Connected to remote server {}".format(server_public_ip))
|
|
169
|
-
return c
|
|
170
196
|
|
|
171
197
|
|
|
172
198
|
def check_dataset_remote_requirements(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.16
|
|
4
4
|
Summary: Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... ).
|
|
5
5
|
Author: filipecosta90
|
|
6
6
|
Author-email: filipecosta.90@gmail.com
|
|
@@ -228,15 +228,15 @@ redisbench_admin/utils/benchmark_config.py,sha256=sVhS2c3p4lBMga0g3U-S9rF8pntcI4
|
|
|
228
228
|
redisbench_admin/utils/local.py,sha256=zUvyVI9LZMT3qyxs1pO3mXL6Bt_1z9EZUGppaRcWNRA,3890
|
|
229
229
|
redisbench_admin/utils/redisearch.py,sha256=lchUEzpt0zB1rHwlDlw9LLifAnxFWcLP-PePw7TjL-0,1602
|
|
230
230
|
redisbench_admin/utils/redisgraph_benchmark_go.py,sha256=os7EJt6kBxsFJLKkSoANbjMT7-cEq4-Ns-49alk2Tf8,2048
|
|
231
|
-
redisbench_admin/utils/remote.py,sha256=
|
|
231
|
+
redisbench_admin/utils/remote.py,sha256=0ZJ4-ygfbciALa8DuYy-6MORFKSoalbFcH04Lm8Oaog,40279
|
|
232
232
|
redisbench_admin/utils/results.py,sha256=uKk3uNJ--bSXlUj_HGQ2OaV6MVqmXJVM8xTzFV6EOw4,3267
|
|
233
233
|
redisbench_admin/utils/ssh.py,sha256=QW4AwlocMHJt05QMdN_4f8WeDmxiEwR80ny8VBThq6k,6533
|
|
234
234
|
redisbench_admin/utils/utils.py,sha256=nQkN3N2iVhoe2GlRxU3BBaicrtw5vZXFaqnstc4i2Fc,14034
|
|
235
235
|
redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
236
236
|
redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
|
|
237
237
|
redisbench_admin/watchdog/watchdog.py,sha256=NiveQyTq22ZCrZoPJYskP9s5MMLRXq9xCGdBwEMNMxg,6225
|
|
238
|
-
redisbench_admin-0.11.
|
|
239
|
-
redisbench_admin-0.11.
|
|
240
|
-
redisbench_admin-0.11.
|
|
241
|
-
redisbench_admin-0.11.
|
|
242
|
-
redisbench_admin-0.11.
|
|
238
|
+
redisbench_admin-0.11.16.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
239
|
+
redisbench_admin-0.11.16.dist-info/METADATA,sha256=7be1EWel3Nqe7V_IJjPUZlb57sbKCxg12c2xYm7DFys,5438
|
|
240
|
+
redisbench_admin-0.11.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
241
|
+
redisbench_admin-0.11.16.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
242
|
+
redisbench_admin-0.11.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|