Skip to content

Commit 9c982b2

Browse files
committed
Update valkey-server creation script to handle errors
1 parent c6bbef1 commit 9c982b2

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

tests/create-valkey-cluster.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,17 @@ echo "Creating cluster..."
5151
--cluster-yes
5252

5353
# 5. Use cluster_manager.py to create the TLS cluster
54-
../valkey-glide/utils/cluster_manager.py --tls start --prefix tls-cluster --cluster-mode -p 8001 8002 8003 8004 8005 8006
54+
echo "Setting up TLS cluster..."
55+
if ../valkey-glide/utils/cluster_manager.py --tls start --prefix tls-cluster --cluster-mode -p 8001 8002 8003 8004 8005 8006; then
56+
echo "✅ TLS cluster started on ports 8001-8006"
57+
else
58+
echo "⚠️ WARNING: TLS cluster setup failed (ports 8001-8006 may be in use), continuing without TLS cluster..."
59+
fi
5560

5661
# 6. Use cluster_manager.py to create cluster with auth
57-
../valkey-glide/utils/cluster_manager.py --auth dummy_password start --prefix auth-cluster --cluster-mode -p 5001 5002 5003 5004 5005 5006
62+
echo "Setting up auth cluster..."
63+
if ../valkey-glide/utils/cluster_manager.py --auth dummy_password start --prefix auth-cluster --cluster-mode -p 5001 5002 5003 5004 5005 5006; then
64+
echo "✅ Auth cluster started on ports 5001-5006"
65+
else
66+
echo "⚠️ WARNING: Auth cluster setup failed (ports 5001-5006 may be in use), continuing without auth cluster..."
67+
fi

tests/start_valkey_with_replicas.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ valkey-server --port 6381 \
2626
--daemonize yes \
2727
--logfile "$BASE_DIR/6381/valkey.log"
2828

29-
../valkey-glide/utils/cluster_manager.py --tls start --prefix tls-standalone -p 6400 -r 0
29+
# Handle TLS setup with graceful failure
30+
echo "Setting up TLS standalone server..."
31+
if ../valkey-glide/utils/cluster_manager.py --tls start --prefix tls-standalone -p 6400 -r 0; then
32+
echo "✅ TLS standalone server started on port 6400"
33+
else
34+
echo "⚠️ WARNING: TLS standalone setup failed (port 6400 may be in use), continuing without TLS..."
35+
fi
3036

3137
# Wait a moment for servers to start
3238
sleep 2
@@ -39,4 +45,3 @@ echo "✅ Valkey setup complete:"
3945
echo "- Primary: 127.0.0.1:6379"
4046
echo "- Replica: 127.0.0.1:6380"
4147
echo "- Replica: 127.0.0.1:6381"
42-

0 commit comments

Comments
 (0)