redisbench-admin 0.11.39__py3-none-any.whl → 0.11.41__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/compare/args.py +5 -0
- redisbench_admin/compare/compare.py +25 -25
- redisbench_admin/deploy/deploy.py +9 -1
- redisbench_admin/environments/oss_cluster.py +37 -0
- redisbench_admin/export/export.py +7 -1
- redisbench_admin/profilers/perf.py +24 -24
- redisbench_admin/run/common.py +24 -6
- redisbench_admin/run/metrics.py +0 -2
- redisbench_admin/run_async/async_terraform.py +10 -2
- redisbench_admin/run_async/render_files.py +3 -3
- redisbench_admin/run_local/args.py +12 -0
- redisbench_admin/run_local/run_local.py +120 -63
- redisbench_admin/run_remote/args.py +32 -0
- redisbench_admin/run_remote/remote_helpers.py +5 -1
- redisbench_admin/run_remote/run_remote.py +123 -18
- redisbench_admin/run_remote/standalone.py +421 -2
- redisbench_admin/run_remote/terraform.py +5 -1
- redisbench_admin/utils/remote.py +44 -4
- {redisbench_admin-0.11.39.dist-info → redisbench_admin-0.11.41.dist-info}/METADATA +8 -2
- {redisbench_admin-0.11.39.dist-info → redisbench_admin-0.11.41.dist-info}/RECORD +23 -23
- {redisbench_admin-0.11.39.dist-info → redisbench_admin-0.11.41.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.11.39.dist-info → redisbench_admin-0.11.41.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.11.39.dist-info → redisbench_admin-0.11.41.dist-info}/entry_points.txt +0 -0
|
@@ -13,6 +13,7 @@ from redisbench_admin.utils.remote import (
|
|
|
13
13
|
)
|
|
14
14
|
from redisbench_admin.utils.ssh import SSHSession
|
|
15
15
|
from redisbench_admin.utils.utils import redis_server_config_module_part
|
|
16
|
+
import tempfile
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
def ensure_redis_server_available(server_public_ip, username, private_key, port=22):
|
|
@@ -148,6 +149,123 @@ def ensure_memtier_benchmark_available(
|
|
|
148
149
|
logging.error("Failed to check memtier_benchmark availability")
|
|
149
150
|
|
|
150
151
|
|
|
152
|
+
def validate_remote_host_compatibility(
|
|
153
|
+
server_public_ip, username, private_key, custom_redis_server_path=None, port=22
|
|
154
|
+
):
|
|
155
|
+
"""
|
|
156
|
+
Validate remote host compatibility by checking OS version, stdlib version,
|
|
157
|
+
and optionally testing a custom redis-server binary.
|
|
158
|
+
|
|
159
|
+
Args:
|
|
160
|
+
server_public_ip: IP address of the remote server
|
|
161
|
+
username: SSH username
|
|
162
|
+
private_key: Path to SSH private key
|
|
163
|
+
custom_redis_server_path: Optional path to custom redis-server binary on remote host
|
|
164
|
+
port: SSH port (default 22)
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
tuple: (success: bool, validation_info: dict)
|
|
168
|
+
"""
|
|
169
|
+
logging.info("Validating remote host compatibility...")
|
|
170
|
+
|
|
171
|
+
validation_info = {}
|
|
172
|
+
success = True
|
|
173
|
+
|
|
174
|
+
try:
|
|
175
|
+
# Check OS version
|
|
176
|
+
os_commands = [
|
|
177
|
+
"uname -a", # System information
|
|
178
|
+
"cat /etc/os-release", # OS release info
|
|
179
|
+
"ldd --version", # glibc version
|
|
180
|
+
]
|
|
181
|
+
|
|
182
|
+
os_results = execute_remote_commands(
|
|
183
|
+
server_public_ip, username, private_key, os_commands, port
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# Process OS information
|
|
187
|
+
for i, (recv_exit_status, stdout, stderr) in enumerate(os_results):
|
|
188
|
+
if recv_exit_status == 0:
|
|
189
|
+
if i == 0: # uname -a
|
|
190
|
+
validation_info["system_info"] = "".join(stdout).strip()
|
|
191
|
+
logging.info(f"System info: {validation_info['system_info']}")
|
|
192
|
+
elif i == 1: # /etc/os-release
|
|
193
|
+
os_release = "".join(stdout).strip()
|
|
194
|
+
validation_info["os_release"] = os_release
|
|
195
|
+
logging.info(f"OS release info: {os_release}")
|
|
196
|
+
elif i == 2: # ldd --version (glibc)
|
|
197
|
+
glibc_info = "".join(stdout).strip()
|
|
198
|
+
validation_info["glibc_version"] = glibc_info
|
|
199
|
+
logging.info(f"glibc version: {glibc_info}")
|
|
200
|
+
else:
|
|
201
|
+
logging.warning(
|
|
202
|
+
f"Command {os_commands[i]} failed with exit code {recv_exit_status}"
|
|
203
|
+
)
|
|
204
|
+
if i == 2: # glibc check failed, try alternative
|
|
205
|
+
alt_result = execute_remote_commands(
|
|
206
|
+
server_public_ip,
|
|
207
|
+
username,
|
|
208
|
+
private_key,
|
|
209
|
+
["getconf GNU_LIBC_VERSION"],
|
|
210
|
+
port,
|
|
211
|
+
)
|
|
212
|
+
if alt_result and alt_result[0][0] == 0:
|
|
213
|
+
glibc_alt = "".join(alt_result[0][1]).strip()
|
|
214
|
+
validation_info["glibc_version"] = glibc_alt
|
|
215
|
+
logging.info(f"glibc version (alternative): {glibc_alt}")
|
|
216
|
+
|
|
217
|
+
# Test custom redis-server binary if provided
|
|
218
|
+
if custom_redis_server_path:
|
|
219
|
+
logging.info(
|
|
220
|
+
f"Testing custom redis-server binary: {custom_redis_server_path}"
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
# Check if the binary exists and is executable
|
|
224
|
+
check_commands = [
|
|
225
|
+
f"test -f {custom_redis_server_path}",
|
|
226
|
+
f"test -x {custom_redis_server_path}",
|
|
227
|
+
f"{custom_redis_server_path} --version",
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
check_results = execute_remote_commands(
|
|
231
|
+
server_public_ip, username, private_key, check_commands, port
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
for i, (recv_exit_status, stdout, stderr) in enumerate(check_results):
|
|
235
|
+
if recv_exit_status != 0:
|
|
236
|
+
if i == 0:
|
|
237
|
+
logging.error(
|
|
238
|
+
f"Custom redis-server binary not found: {custom_redis_server_path}"
|
|
239
|
+
)
|
|
240
|
+
success = False
|
|
241
|
+
elif i == 1:
|
|
242
|
+
logging.error(
|
|
243
|
+
f"Custom redis-server binary not executable: {custom_redis_server_path}"
|
|
244
|
+
)
|
|
245
|
+
success = False
|
|
246
|
+
elif i == 2:
|
|
247
|
+
logging.error(
|
|
248
|
+
f"Custom redis-server binary --version failed: {stderr}"
|
|
249
|
+
)
|
|
250
|
+
success = False
|
|
251
|
+
break
|
|
252
|
+
elif i == 2: # --version succeeded
|
|
253
|
+
version_output = "".join(stdout).strip()
|
|
254
|
+
validation_info["custom_redis_version"] = version_output
|
|
255
|
+
logging.info(f"Custom redis-server version: {version_output}")
|
|
256
|
+
|
|
257
|
+
except Exception as e:
|
|
258
|
+
logging.error(f"Remote host validation failed with exception: {e}")
|
|
259
|
+
success = False
|
|
260
|
+
|
|
261
|
+
if success:
|
|
262
|
+
logging.info("✅ Remote host validation passed")
|
|
263
|
+
else:
|
|
264
|
+
logging.error("❌ Remote host validation failed")
|
|
265
|
+
|
|
266
|
+
return success, validation_info
|
|
267
|
+
|
|
268
|
+
|
|
151
269
|
def spin_up_standalone_remote_redis(
|
|
152
270
|
temporary_dir,
|
|
153
271
|
server_public_ip,
|
|
@@ -290,10 +408,24 @@ def generate_remote_standalone_redis_cmd(
|
|
|
290
408
|
modules_configuration_parameters_map,
|
|
291
409
|
enable_redis_7_config_directives=True,
|
|
292
410
|
enable_debug_command="yes",
|
|
411
|
+
custom_redis_server_path=None,
|
|
412
|
+
custom_redis_conf_path=None,
|
|
293
413
|
):
|
|
294
|
-
|
|
295
|
-
|
|
414
|
+
# Use custom redis-server binary if provided, otherwise use default
|
|
415
|
+
redis_server_binary = (
|
|
416
|
+
custom_redis_server_path if custom_redis_server_path else "redis-server"
|
|
296
417
|
)
|
|
418
|
+
|
|
419
|
+
# If custom config file is provided, use it; otherwise use command line parameters
|
|
420
|
+
if custom_redis_conf_path:
|
|
421
|
+
initial_redis_cmd = "{} {} --daemonize yes".format(
|
|
422
|
+
redis_server_binary, custom_redis_conf_path
|
|
423
|
+
)
|
|
424
|
+
logging.info(f"Using custom redis.conf: {custom_redis_conf_path}")
|
|
425
|
+
else:
|
|
426
|
+
initial_redis_cmd = "{} --save '' --logfile {} --dir {} --daemonize yes --protected-mode no ".format(
|
|
427
|
+
redis_server_binary, logfile, temporary_dir
|
|
428
|
+
)
|
|
297
429
|
if enable_redis_7_config_directives:
|
|
298
430
|
extra_str = " --enable-debug-command {} ".format(enable_debug_command)
|
|
299
431
|
initial_redis_cmd = initial_redis_cmd + extra_str
|
|
@@ -323,3 +455,290 @@ def generate_remote_standalone_redis_cmd(
|
|
|
323
455
|
if remote_module_files is not None:
|
|
324
456
|
initial_redis_cmd += " " + " ".join(command)
|
|
325
457
|
return full_logfile, initial_redis_cmd
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
def spin_test_standalone_redis(
|
|
461
|
+
server_public_ip,
|
|
462
|
+
username,
|
|
463
|
+
private_key,
|
|
464
|
+
db_ssh_port=22,
|
|
465
|
+
redis_port=6379,
|
|
466
|
+
local_module_files=None,
|
|
467
|
+
redis_configuration_parameters=None,
|
|
468
|
+
modules_configuration_parameters_map=None,
|
|
469
|
+
custom_redis_conf_path=None,
|
|
470
|
+
custom_redis_server_path=None,
|
|
471
|
+
):
|
|
472
|
+
"""
|
|
473
|
+
Setup standalone Redis server, run INFO SERVER, print output as markdown and exit.
|
|
474
|
+
|
|
475
|
+
Args:
|
|
476
|
+
server_public_ip: IP address of the remote server
|
|
477
|
+
username: SSH username
|
|
478
|
+
private_key: Path to SSH private key
|
|
479
|
+
db_ssh_port: SSH port (default 22)
|
|
480
|
+
redis_port: Redis port (default 6379)
|
|
481
|
+
local_module_files: List of local module files to copy
|
|
482
|
+
redis_configuration_parameters: Dict of Redis configuration parameters
|
|
483
|
+
modules_configuration_parameters_map: Dict of module configuration parameters
|
|
484
|
+
custom_redis_conf_path: Path to custom redis.conf file
|
|
485
|
+
custom_redis_server_path: Path to custom redis-server binary
|
|
486
|
+
"""
|
|
487
|
+
logging.info("🚀 Starting spin-test mode...")
|
|
488
|
+
|
|
489
|
+
try:
|
|
490
|
+
# Create temporary directory on remote host
|
|
491
|
+
temporary_dir = "/tmp/redisbench-spin-test"
|
|
492
|
+
create_dir_commands = [f"mkdir -p {temporary_dir}"]
|
|
493
|
+
execute_remote_commands(
|
|
494
|
+
server_public_ip, username, private_key, create_dir_commands, db_ssh_port
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
# Ensure Redis server is available (only if not using custom binary)
|
|
498
|
+
if custom_redis_server_path is None:
|
|
499
|
+
ensure_redis_server_available(
|
|
500
|
+
server_public_ip, username, private_key, db_ssh_port
|
|
501
|
+
)
|
|
502
|
+
else:
|
|
503
|
+
logging.info(
|
|
504
|
+
"🔧 Using custom Redis binary - skipping system Redis installation"
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
# Copy custom Redis files if provided
|
|
508
|
+
remote_redis_conf_path = None
|
|
509
|
+
remote_redis_server_path = None
|
|
510
|
+
|
|
511
|
+
if custom_redis_conf_path:
|
|
512
|
+
if not os.path.exists(custom_redis_conf_path):
|
|
513
|
+
logging.error(
|
|
514
|
+
f"❌ Custom redis.conf file not found: {custom_redis_conf_path}"
|
|
515
|
+
)
|
|
516
|
+
return False
|
|
517
|
+
|
|
518
|
+
remote_redis_conf_path = f"{temporary_dir}/redis.conf"
|
|
519
|
+
logging.info(f"📁 Copying custom redis.conf to remote host...")
|
|
520
|
+
|
|
521
|
+
copy_result = copy_file_to_remote_setup(
|
|
522
|
+
server_public_ip,
|
|
523
|
+
username,
|
|
524
|
+
private_key,
|
|
525
|
+
custom_redis_conf_path,
|
|
526
|
+
remote_redis_conf_path,
|
|
527
|
+
None,
|
|
528
|
+
db_ssh_port,
|
|
529
|
+
False, # don't continue on error
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
if not copy_result:
|
|
533
|
+
logging.error("❌ Failed to copy redis.conf to remote host")
|
|
534
|
+
return False
|
|
535
|
+
|
|
536
|
+
if custom_redis_server_path:
|
|
537
|
+
if not os.path.exists(custom_redis_server_path):
|
|
538
|
+
logging.error(
|
|
539
|
+
f"❌ Custom redis-server binary not found: {custom_redis_server_path}"
|
|
540
|
+
)
|
|
541
|
+
return False
|
|
542
|
+
|
|
543
|
+
remote_redis_server_path = f"{temporary_dir}/redis-server"
|
|
544
|
+
logging.info(f"📁 Copying custom redis-server binary to remote host...")
|
|
545
|
+
|
|
546
|
+
copy_result = copy_file_to_remote_setup(
|
|
547
|
+
server_public_ip,
|
|
548
|
+
username,
|
|
549
|
+
private_key,
|
|
550
|
+
custom_redis_server_path,
|
|
551
|
+
remote_redis_server_path,
|
|
552
|
+
None,
|
|
553
|
+
db_ssh_port,
|
|
554
|
+
False, # don't continue on error
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
if not copy_result:
|
|
558
|
+
logging.error("❌ Failed to copy redis-server binary to remote host")
|
|
559
|
+
return False
|
|
560
|
+
|
|
561
|
+
# Make the binary executable
|
|
562
|
+
chmod_commands = [f"chmod +x {remote_redis_server_path}"]
|
|
563
|
+
chmod_results = execute_remote_commands(
|
|
564
|
+
server_public_ip, username, private_key, chmod_commands, db_ssh_port
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
recv_exit_status, stdout, stderr = chmod_results[0]
|
|
568
|
+
if recv_exit_status != 0:
|
|
569
|
+
logging.warning(
|
|
570
|
+
f"⚠️ Failed to make redis-server binary executable: {stderr}"
|
|
571
|
+
)
|
|
572
|
+
else:
|
|
573
|
+
logging.info("✅ Redis-server binary made executable")
|
|
574
|
+
|
|
575
|
+
# Copy modules if provided
|
|
576
|
+
remote_module_files = None
|
|
577
|
+
if local_module_files:
|
|
578
|
+
remote_module_file_dir = f"{temporary_dir}/modules"
|
|
579
|
+
create_module_dir_commands = [f"mkdir -p {remote_module_file_dir}"]
|
|
580
|
+
execute_remote_commands(
|
|
581
|
+
server_public_ip,
|
|
582
|
+
username,
|
|
583
|
+
private_key,
|
|
584
|
+
create_module_dir_commands,
|
|
585
|
+
db_ssh_port,
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
remote_module_files = remote_module_files_cp(
|
|
589
|
+
local_module_files,
|
|
590
|
+
db_ssh_port,
|
|
591
|
+
private_key,
|
|
592
|
+
remote_module_file_dir,
|
|
593
|
+
server_public_ip,
|
|
594
|
+
username,
|
|
595
|
+
continue_on_module_check_error=True,
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
# Generate Redis startup command
|
|
599
|
+
logfile = "redis-spin-test.log"
|
|
600
|
+
full_logfile, redis_cmd = generate_remote_standalone_redis_cmd(
|
|
601
|
+
logfile,
|
|
602
|
+
redis_configuration_parameters,
|
|
603
|
+
remote_module_files,
|
|
604
|
+
temporary_dir,
|
|
605
|
+
modules_configuration_parameters_map or {},
|
|
606
|
+
enable_redis_7_config_directives=True,
|
|
607
|
+
enable_debug_command="yes",
|
|
608
|
+
custom_redis_server_path=remote_redis_server_path,
|
|
609
|
+
custom_redis_conf_path=remote_redis_conf_path,
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# Override port if specified
|
|
613
|
+
if redis_port != 6379:
|
|
614
|
+
redis_cmd += f" --port {redis_port}"
|
|
615
|
+
|
|
616
|
+
logging.info(f"🔧 Starting Redis with command: {redis_cmd}")
|
|
617
|
+
|
|
618
|
+
# Start Redis server
|
|
619
|
+
start_commands = [redis_cmd]
|
|
620
|
+
start_result = execute_remote_commands(
|
|
621
|
+
server_public_ip, username, private_key, start_commands, db_ssh_port
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
# Check if Redis started successfully
|
|
625
|
+
recv_exit_status, stdout, stderr = start_result[0]
|
|
626
|
+
if recv_exit_status != 0:
|
|
627
|
+
logging.error(
|
|
628
|
+
f"❌ Failed to start Redis server. Exit code: {recv_exit_status}"
|
|
629
|
+
)
|
|
630
|
+
logging.error(f"STDOUT: {stdout}")
|
|
631
|
+
logging.error(f"STDERR: {stderr}")
|
|
632
|
+
return False
|
|
633
|
+
|
|
634
|
+
# Wait a moment for Redis to fully start
|
|
635
|
+
import time
|
|
636
|
+
|
|
637
|
+
time.sleep(2)
|
|
638
|
+
|
|
639
|
+
# Collect system information
|
|
640
|
+
logging.info("📊 Collecting system information...")
|
|
641
|
+
system_commands = [
|
|
642
|
+
"uname -a", # System information
|
|
643
|
+
"cat /etc/os-release", # OS release info
|
|
644
|
+
"ldd --version 2>/dev/null || getconf GNU_LIBC_VERSION 2>/dev/null || echo 'glibc version not available'", # glibc version
|
|
645
|
+
"cat /proc/version", # Kernel version
|
|
646
|
+
"cat /proc/cpuinfo | grep 'model name' | head -1", # CPU info
|
|
647
|
+
"free -h", # Memory info
|
|
648
|
+
"df -h /", # Disk space
|
|
649
|
+
]
|
|
650
|
+
|
|
651
|
+
system_results = execute_remote_commands(
|
|
652
|
+
server_public_ip, username, private_key, system_commands, db_ssh_port
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
# Run INFO SERVER command
|
|
656
|
+
info_commands = [f"redis-cli -p {redis_port} INFO SERVER"]
|
|
657
|
+
info_result = execute_remote_commands(
|
|
658
|
+
server_public_ip, username, private_key, info_commands, db_ssh_port
|
|
659
|
+
)
|
|
660
|
+
|
|
661
|
+
recv_exit_status, stdout, stderr = info_result[0]
|
|
662
|
+
if recv_exit_status != 0:
|
|
663
|
+
logging.error(
|
|
664
|
+
f"❌ Failed to run INFO SERVER. Exit code: {recv_exit_status}"
|
|
665
|
+
)
|
|
666
|
+
logging.error(f"STDOUT: {stdout}")
|
|
667
|
+
logging.error(f"STDERR: {stderr}")
|
|
668
|
+
return False
|
|
669
|
+
|
|
670
|
+
# Format output as markdown
|
|
671
|
+
info_output = "".join(stdout).strip()
|
|
672
|
+
|
|
673
|
+
print("\n" + "=" * 80)
|
|
674
|
+
print("🎯 REDIS SPIN-TEST RESULTS")
|
|
675
|
+
print("=" * 80)
|
|
676
|
+
print()
|
|
677
|
+
|
|
678
|
+
# Display system information
|
|
679
|
+
print("## 🖥️ System Information")
|
|
680
|
+
print()
|
|
681
|
+
|
|
682
|
+
system_labels = [
|
|
683
|
+
"System Info",
|
|
684
|
+
"OS Release",
|
|
685
|
+
"glibc Version",
|
|
686
|
+
"Kernel Version",
|
|
687
|
+
"CPU Model",
|
|
688
|
+
"Memory",
|
|
689
|
+
"Disk Space",
|
|
690
|
+
]
|
|
691
|
+
|
|
692
|
+
for i, (label, (recv_exit_status, stdout, stderr)) in enumerate(
|
|
693
|
+
zip(system_labels, system_results)
|
|
694
|
+
):
|
|
695
|
+
if recv_exit_status == 0 and stdout:
|
|
696
|
+
output = "".join(stdout).strip()
|
|
697
|
+
if output:
|
|
698
|
+
print(f"**{label}:**")
|
|
699
|
+
print("```")
|
|
700
|
+
print(output)
|
|
701
|
+
print("```")
|
|
702
|
+
print()
|
|
703
|
+
else:
|
|
704
|
+
print(f"**{label}:** ⚠️ Not available")
|
|
705
|
+
print()
|
|
706
|
+
|
|
707
|
+
# Display Redis information
|
|
708
|
+
print("## 🔴 Redis Server Information")
|
|
709
|
+
print()
|
|
710
|
+
print("```")
|
|
711
|
+
print(info_output)
|
|
712
|
+
print("```")
|
|
713
|
+
print()
|
|
714
|
+
print("✅ Spin-test completed successfully!")
|
|
715
|
+
print("=" * 80)
|
|
716
|
+
|
|
717
|
+
# Cleanup: Stop Redis server
|
|
718
|
+
cleanup_commands = [
|
|
719
|
+
f"redis-cli -p {redis_port} shutdown nosave",
|
|
720
|
+
f"rm -rf {temporary_dir}",
|
|
721
|
+
]
|
|
722
|
+
execute_remote_commands(
|
|
723
|
+
server_public_ip, username, private_key, cleanup_commands, db_ssh_port
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
logging.info("🧹 Cleanup completed")
|
|
727
|
+
return True
|
|
728
|
+
|
|
729
|
+
except Exception as e:
|
|
730
|
+
logging.error(f"❌ Spin-test failed with error: {e}")
|
|
731
|
+
|
|
732
|
+
# Attempt cleanup on error
|
|
733
|
+
try:
|
|
734
|
+
cleanup_commands = [
|
|
735
|
+
f"redis-cli -p {redis_port} shutdown nosave",
|
|
736
|
+
f"rm -rf {temporary_dir}",
|
|
737
|
+
]
|
|
738
|
+
execute_remote_commands(
|
|
739
|
+
server_public_ip, username, private_key, cleanup_commands, db_ssh_port
|
|
740
|
+
)
|
|
741
|
+
except:
|
|
742
|
+
pass # Ignore cleanup errors
|
|
743
|
+
|
|
744
|
+
return False
|
|
@@ -32,7 +32,11 @@ def terraform_spin_or_reuse_env(
|
|
|
32
32
|
tf_folder_path=None,
|
|
33
33
|
architecture="x86_64",
|
|
34
34
|
):
|
|
35
|
-
(
|
|
35
|
+
(
|
|
36
|
+
remote_setup,
|
|
37
|
+
deployment_type,
|
|
38
|
+
remote_id,
|
|
39
|
+
) = fetch_remote_setup_from_config(
|
|
36
40
|
benchmark_config["remote"],
|
|
37
41
|
"https://github.com/redis-performance/testing-infrastructure.git",
|
|
38
42
|
"master",
|
redisbench_admin/utils/remote.py
CHANGED
|
@@ -629,6 +629,15 @@ def push_data_to_redistimeseries(rts, time_series_dict: dict, expire_msecs=0):
|
|
|
629
629
|
)
|
|
630
630
|
for timeseries_name, time_series in time_series_dict.items():
|
|
631
631
|
try:
|
|
632
|
+
arch = "x86_64"
|
|
633
|
+
if "arch" in time_series["labels"]:
|
|
634
|
+
arch = time_series["labels"]["arch"]
|
|
635
|
+
if arch == "aarch64" and "aarch64" not in timeseries_name:
|
|
636
|
+
original_timeseries_name = timeseries_name
|
|
637
|
+
timeseries_name = f"{timeseries_name}/arch/{arch}"
|
|
638
|
+
logging.warning(
|
|
639
|
+
f"overriding key named {original_timeseries_name} given it does not contain arch and it's not x86_64. new key={timeseries_name}"
|
|
640
|
+
)
|
|
632
641
|
exporter_create_ts(rts, time_series, timeseries_name)
|
|
633
642
|
for timestamp, value in time_series["data"].items():
|
|
634
643
|
try:
|
|
@@ -771,7 +780,10 @@ def extract_perversion_timeseries_from_results(
|
|
|
771
780
|
):
|
|
772
781
|
break_by_key = "version"
|
|
773
782
|
break_by_str = "by.{}".format(break_by_key)
|
|
774
|
-
(
|
|
783
|
+
(
|
|
784
|
+
branch_time_series_dict,
|
|
785
|
+
target_tables,
|
|
786
|
+
) = common_timeseries_extraction(
|
|
775
787
|
break_by_key,
|
|
776
788
|
break_by_str,
|
|
777
789
|
datapoints_timestamp,
|
|
@@ -942,9 +954,9 @@ def from_metric_kv_to_timeserie(
|
|
|
942
954
|
|
|
943
955
|
target_table_dict[target_name] = target_value
|
|
944
956
|
|
|
945
|
-
target_table_dict[
|
|
946
|
-
|
|
947
|
-
|
|
957
|
+
target_table_dict["{}:percent {}".format(target_name, comparison_type)] = (
|
|
958
|
+
target_value_pct_str
|
|
959
|
+
)
|
|
948
960
|
return target_table_keyname, target_table_dict
|
|
949
961
|
|
|
950
962
|
|
|
@@ -1186,3 +1198,31 @@ def check_ec2_env():
|
|
|
1186
1198
|
logging.error(error_message)
|
|
1187
1199
|
|
|
1188
1200
|
return status, error_message
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
def perform_connectivity_test(redis_conns, test_description=""):
|
|
1204
|
+
"""Perform PING test on all Redis connections"""
|
|
1205
|
+
logging.info(f"🔍 Performing connectivity test: {test_description}")
|
|
1206
|
+
|
|
1207
|
+
success_count = 0
|
|
1208
|
+
total_count = len(redis_conns)
|
|
1209
|
+
|
|
1210
|
+
for i, conn in enumerate(redis_conns):
|
|
1211
|
+
try:
|
|
1212
|
+
result = conn.ping()
|
|
1213
|
+
if result:
|
|
1214
|
+
logging.info(f"✅ Connection {i}: PING successful")
|
|
1215
|
+
success_count += 1
|
|
1216
|
+
else:
|
|
1217
|
+
logging.error(f"❌ Connection {i}: PING returned False")
|
|
1218
|
+
except Exception as e:
|
|
1219
|
+
logging.error(f"❌ Connection {i}: PING failed - {e}")
|
|
1220
|
+
|
|
1221
|
+
if success_count == total_count:
|
|
1222
|
+
logging.info(f"🎉 All {total_count} connectivity tests passed!")
|
|
1223
|
+
return True
|
|
1224
|
+
else:
|
|
1225
|
+
logging.error(
|
|
1226
|
+
f"💥 {total_count - success_count}/{total_count} connectivity tests failed!"
|
|
1227
|
+
)
|
|
1228
|
+
return False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.41
|
|
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
|
|
@@ -154,7 +154,13 @@ $ tox
|
|
|
154
154
|
|
|
155
155
|
To run a specific test:
|
|
156
156
|
```sh
|
|
157
|
-
$ tox -- tests/
|
|
157
|
+
$ tox -- tests/test_defaults_purpose_built_env.py
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
To run a specific test and persist the docker container used for timeseries:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
tox --docker-dont-stop=rts_datasink -- -vv --log-cli-level=INFO tests/test_defaults_purpose_built_env.py
|
|
158
164
|
```
|
|
159
165
|
|
|
160
166
|
To run a specific test with verbose logging:
|
|
@@ -3,19 +3,19 @@ redisbench_admin/cli.py,sha256=LAS5qnqScXKhxHYfXWB0mvAYaUYrSurIwadhexEa9g4,7740
|
|
|
3
3
|
redisbench_admin/commands/__init__.py,sha256=mzVrEtqefFdopyzR-W6xx3How95dyZfToGKm1-_YzeY,95
|
|
4
4
|
redisbench_admin/commands/commands.json.py,sha256=mzVrEtqefFdopyzR-W6xx3How95dyZfToGKm1-_YzeY,95
|
|
5
5
|
redisbench_admin/compare/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
6
|
-
redisbench_admin/compare/args.py,sha256=
|
|
7
|
-
redisbench_admin/compare/compare.py,sha256=
|
|
6
|
+
redisbench_admin/compare/args.py,sha256=rOP8td_GYPYsZiYN4olyYmUsku-oizggEZNRTB_fVro,6336
|
|
7
|
+
redisbench_admin/compare/compare.py,sha256=NvC7RbQUJUKlPdJQj9TjUmk2k8UtiA9wnZWNDV7IM_Q,103315
|
|
8
8
|
redisbench_admin/deploy/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
9
9
|
redisbench_admin/deploy/args.py,sha256=neLUcQqI__HkJItkQg2C293hl5g3yHG40t171r7-E5Y,1732
|
|
10
|
-
redisbench_admin/deploy/deploy.py,sha256=
|
|
10
|
+
redisbench_admin/deploy/deploy.py,sha256=MtfJbsL97DLrbBYut6zRCzyEMebX4xWoZE-m4-JDRB8,3885
|
|
11
11
|
redisbench_admin/environments/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
12
|
-
redisbench_admin/environments/oss_cluster.py,sha256=
|
|
12
|
+
redisbench_admin/environments/oss_cluster.py,sha256=yYOvDRcEJxG9dkzd-lvaKTrt71MNeMdAV0G6TjHxsX8,8142
|
|
13
13
|
redisbench_admin/environments/oss_standalone.py,sha256=Sl38rUpwJ3wNOl9zn38iK8q2iJi2pRFmaJAZJbuT_SQ,2474
|
|
14
14
|
redisbench_admin/export/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
15
15
|
redisbench_admin/export/args.py,sha256=v_WjJCNz_LeIFMNwSN6XwRmvSx1K2ys8XS1gK50EM_4,3508
|
|
16
16
|
redisbench_admin/export/common/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
17
17
|
redisbench_admin/export/common/common.py,sha256=LnvXjMLlJRzMTxiFIjrfRFfDx9JJm88OZHu7lnTOpFA,4331
|
|
18
|
-
redisbench_admin/export/export.py,sha256=
|
|
18
|
+
redisbench_admin/export/export.py,sha256=u00NjaCbWhCJ319leVlP4ZkqiqZt5FN4Gbag4Poo23M,11274
|
|
19
19
|
redisbench_admin/export/google_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
20
20
|
redisbench_admin/export/google_benchmark/google_benchmark_json_format.py,sha256=OuMaMmmma5VvXA0rcLIQSMxIq81oa5I3xYDFhbWj-IA,1804
|
|
21
21
|
redisbench_admin/export/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
@@ -35,7 +35,7 @@ redisbench_admin/grafana_api/grafana_api.py,sha256=dG17GCYmWRILmy7h3-OiBeGzuNGnR
|
|
|
35
35
|
redisbench_admin/profilers/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
36
36
|
redisbench_admin/profilers/daemon.py,sha256=Y4ZbbH-cRHJk9cvpsb60UZFq_HVHWXtatb7T2vtlRKo,12973
|
|
37
37
|
redisbench_admin/profilers/flamegraph.pl,sha256=Za5XE-1gb_U-nzqwoyRwfe1TB182c64gITa-2klWTTA,35898
|
|
38
|
-
redisbench_admin/profilers/perf.py,sha256=
|
|
38
|
+
redisbench_admin/profilers/perf.py,sha256=HtzzMVsXEJa1H7tOAfKlbFYDn2KnxAG_IU9yKPKZB7w,27772
|
|
39
39
|
redisbench_admin/profilers/perf_daemon_caller.py,sha256=nD97cXmX3JytyafvNMmhUBq40uYrf6vtjdJ1TXZbvVY,4948
|
|
40
40
|
redisbench_admin/profilers/pprof.py,sha256=g7oNC3AtNDTUOBIh_mIi5bFl_b0mL8tqBu6qKvAOrKw,3949
|
|
41
41
|
redisbench_admin/profilers/profilers.py,sha256=4C1xaPyLoPydJ3eBAxW7IlSHG-3qj3A3BAKejiZXEK0,510
|
|
@@ -176,14 +176,14 @@ redisbench_admin/run/ann/pkg/test/test-jaccard.py,sha256=oIhaQCQKrQokwv3fvgLSwPl
|
|
|
176
176
|
redisbench_admin/run/ann/pkg/test/test-metrics.py,sha256=vJdS8Kuk8bAnpB65Uqb-9rUUI35XrHwaO3cNwKX5gxc,3057
|
|
177
177
|
redisbench_admin/run/args.py,sha256=tevHZrezJ4RreHp6K-MGHko3e1Gi_IdsS2Q0jD2ZSoU,8173
|
|
178
178
|
redisbench_admin/run/cluster.py,sha256=_Y6a8Dbu1cJ7OxhgymKQSZcCmV8cZ3UpGEWL6b6O84Y,6363
|
|
179
|
-
redisbench_admin/run/common.py,sha256=
|
|
179
|
+
redisbench_admin/run/common.py,sha256=5TAxmHbUti7S3nzPzn7f-L4ls6gpStU2C4yvkiii7m4,28410
|
|
180
180
|
redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
181
181
|
redisbench_admin/run/ftsb/ftsb.py,sha256=NP-K_hCEagmX5ayN0pQVtOdQxDTwgxKrnzz9_MLT9qQ,2492
|
|
182
182
|
redisbench_admin/run/git.py,sha256=6UYGcTN0MPzf4QDVoJnFkou0yZasLF6jLG7f0zoySq8,3064
|
|
183
183
|
redisbench_admin/run/grafana.py,sha256=iMDgMyJKinpZMTD43rZ1IcRGkadjFjCxaB48mYWkvG4,9421
|
|
184
184
|
redisbench_admin/run/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
185
185
|
redisbench_admin/run/memtier_benchmark/memtier_benchmark.py,sha256=wTd2olovvFBZ98mOSr6DM5BJsdaiuPteEZzBqeSgbkE,4246
|
|
186
|
-
redisbench_admin/run/metrics.py,sha256=
|
|
186
|
+
redisbench_admin/run/metrics.py,sha256=8EQdcZbCiFB_kIR1WtUQNOPV8y74bZ8Dj51Cv0aR4nk,7556
|
|
187
187
|
redisbench_admin/run/modules.py,sha256=9To85oDw2tmUNmTDxOgvKls_46oZRcd2cCt6xNjIWiA,1691
|
|
188
188
|
redisbench_admin/run/redis_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
189
189
|
redisbench_admin/run/redis_benchmark/redis_benchmark.py,sha256=e-Az2uTlt3z2W4uzlUsdxeT8GITpxpGb-Mjb6JxrSWc,6848
|
|
@@ -199,19 +199,19 @@ redisbench_admin/run/ycsb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
199
199
|
redisbench_admin/run/ycsb/ycsb.py,sha256=cs5saVH7C4YpDvzhoa15PwEho59qTVR1E90v_FYjMVw,6873
|
|
200
200
|
redisbench_admin/run_async/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
201
201
|
redisbench_admin/run_async/async_env.py,sha256=tE1turaaZNHfOaSpGxh62EJWp88zoQFUf3sMbaS7JRA,2408
|
|
202
|
-
redisbench_admin/run_async/async_terraform.py,sha256=
|
|
202
|
+
redisbench_admin/run_async/async_terraform.py,sha256=ngOQnECUuC20pZwiJItaiBnzlwT2DiKciPTHtqLURe4,11299
|
|
203
203
|
redisbench_admin/run_async/benchmark.py,sha256=S-dsaWGjgsPQxj8sXAACnbtNw5zlJnRFoo53ULbrMEY,1630
|
|
204
204
|
redisbench_admin/run_async/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
205
|
-
redisbench_admin/run_async/render_files.py,sha256=
|
|
205
|
+
redisbench_admin/run_async/render_files.py,sha256=NMagmx-2hsMET_XN8tkmQz55g-azqW7SjAqaq4GL8F0,2676
|
|
206
206
|
redisbench_admin/run_async/run_async.py,sha256=g2ZOQqj9vXZYaRyNpJZtgfYyY9tMuRmEv3Hh3qWOUs8,14525
|
|
207
207
|
redisbench_admin/run_local/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
208
|
-
redisbench_admin/run_local/args.py,sha256=
|
|
208
|
+
redisbench_admin/run_local/args.py,sha256=LPpqtx1cH1dkkeHjYlaFnAp_TijxnzPZFO2CmYD9ikU,1906
|
|
209
209
|
redisbench_admin/run_local/local_client.py,sha256=gwawMDOBrf7m--uyxu8kMZC5LBiLjbUBSKvzVOdOAas,124
|
|
210
210
|
redisbench_admin/run_local/local_db.py,sha256=9vINqKOs-wDMFEuEHT0I8KO9YnEo_h4NWNk5da3LwSY,7518
|
|
211
211
|
redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
|
|
212
|
-
redisbench_admin/run_local/run_local.py,sha256=
|
|
212
|
+
redisbench_admin/run_local/run_local.py,sha256=QHnGfVAaVuct7t0WrWyQpbirC3MWX7fQF5-kXU_pJBs,34834
|
|
213
213
|
redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
214
|
-
redisbench_admin/run_remote/args.py,sha256=
|
|
214
|
+
redisbench_admin/run_remote/args.py,sha256=Ef32mg1yNYYHL5g59SzIWZqFB__RNLLriPqiucVyoNg,4826
|
|
215
215
|
redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
|
|
216
216
|
redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
217
217
|
redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
|
|
@@ -219,24 +219,24 @@ redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizE
|
|
|
219
219
|
redisbench_admin/run_remote/remote_db.py,sha256=EEDeiOZk-godr5EINscEkOJLGWUN3gFfH6RaBzAKbak,14566
|
|
220
220
|
redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
|
|
221
221
|
redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
|
|
222
|
-
redisbench_admin/run_remote/remote_helpers.py,sha256=
|
|
223
|
-
redisbench_admin/run_remote/run_remote.py,sha256=
|
|
224
|
-
redisbench_admin/run_remote/standalone.py,sha256=
|
|
225
|
-
redisbench_admin/run_remote/terraform.py,sha256=
|
|
222
|
+
redisbench_admin/run_remote/remote_helpers.py,sha256=skWeGyDJBmyx_UwUekT3N3_nOJvF2-Hvu-E7vKlO9gg,10598
|
|
223
|
+
redisbench_admin/run_remote/run_remote.py,sha256=tZqCu1fTfB5gWooVIEsSDoaVfnVRfxeCpn-RLmYI3IM,75476
|
|
224
|
+
redisbench_admin/run_remote/standalone.py,sha256=OGau_7MpQihbn0U4qa0QmGZnwQ_gJhuxuWiQm9zpp7M,27970
|
|
225
|
+
redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
|
|
226
226
|
redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
227
227
|
redisbench_admin/utils/benchmark_config.py,sha256=bC2C6rnj89wkkSlOXyyfe0N15unn_M1t1zfskfVkb98,21387
|
|
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=RAQ2VxfmlK7swN7ujCuwSI2soGSycjnxbQw_IrLxIFE,42205
|
|
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=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6rTo,15085
|
|
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=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
|
|
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.41.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
239
|
+
redisbench_admin-0.11.41.dist-info/METADATA,sha256=doOixz08d09LZGCuGz9OsIuNdcP_1fYqxaiLwUacBCY,5596
|
|
240
|
+
redisbench_admin-0.11.41.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
241
|
+
redisbench_admin-0.11.41.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
242
|
+
redisbench_admin-0.11.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|