redisbench-admin 0.11.14__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/run/ssh.py +14 -0
- redisbench_admin/utils/remote.py +31 -5
- {redisbench_admin-0.11.14.dist-info → redisbench_admin-0.11.16.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.14.dist-info → redisbench_admin-0.11.16.dist-info}/RECORD +7 -7
- {redisbench_admin-0.11.14.dist-info → redisbench_admin-0.11.16.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.11.14.dist-info → redisbench_admin-0.11.16.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.11.14.dist-info → redisbench_admin-0.11.16.dist-info}/entry_points.txt +0 -0
redisbench_admin/run/ssh.py
CHANGED
|
@@ -70,6 +70,19 @@ def check_connection(ssh_conn):
|
|
|
70
70
|
return False
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
def ensure_400_permissions(file_path):
|
|
74
|
+
import stat
|
|
75
|
+
|
|
76
|
+
file_stat = os.stat(file_path)
|
|
77
|
+
current_permissions = stat.S_IMODE(file_stat.st_mode)
|
|
78
|
+
|
|
79
|
+
if current_permissions != 0o400:
|
|
80
|
+
logging.info(f"Changing permissions of {file_path} to 400")
|
|
81
|
+
os.chmod(file_path, 0o400)
|
|
82
|
+
else:
|
|
83
|
+
logging.info(f"{file_path} already has 400 permissions.")
|
|
84
|
+
|
|
85
|
+
|
|
73
86
|
def ssh_pem_check(EC2_PRIVATE_PEM, private_key):
|
|
74
87
|
if os.path.exists(private_key) is False:
|
|
75
88
|
if EC2_PRIVATE_PEM is not None and EC2_PRIVATE_PEM != "":
|
|
@@ -90,3 +103,4 @@ def ssh_pem_check(EC2_PRIVATE_PEM, private_key):
|
|
|
90
103
|
logging.info(
|
|
91
104
|
"Confirmed that private key path artifact: '{}' exists!".format(private_key)
|
|
92
105
|
)
|
|
106
|
+
ensure_400_permissions(private_key)
|
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
|
|
@@ -192,7 +192,7 @@ redisbench_admin/run/redisgraph_benchmark_go/redisgraph_benchmark_go.py,sha256=D
|
|
|
192
192
|
redisbench_admin/run/redistimeseries.py,sha256=x3PA7QoHXu53zs5v0ekK2sVmUnA9_ZF2JxgCDf1Mui4,21331
|
|
193
193
|
redisbench_admin/run/run.py,sha256=WIBc1q5198Ln3Elfgk6D1_ezuAKx5kM_xsxnxGe66-I,5586
|
|
194
194
|
redisbench_admin/run/s3.py,sha256=pXQXZ1rrwDCWeBegGR4aKzbKqWWwMrmqvIjFxEB3bh4,442
|
|
195
|
-
redisbench_admin/run/ssh.py,sha256=
|
|
195
|
+
redisbench_admin/run/ssh.py,sha256=vLesv-a1Ze7Prb8rCnquBbLS1Svj-EZtrSs36RbVHro,3269
|
|
196
196
|
redisbench_admin/run/tsbs_run_queries_redistimeseries/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
197
197
|
redisbench_admin/run/tsbs_run_queries_redistimeseries/tsbs_run_queries_redistimeseries.py,sha256=9JWh23vG_4pNZuv6-kVk7_5C6qJ2ZOBWv53LxGMKXgs,2426
|
|
198
198
|
redisbench_admin/run/ycsb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -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
|