Skip to content

Commit c686a28

Browse files
committed
refactor(cluster): rename supervisord_stop to stop-cluster
Renamed the cluster stop script from `supervisord_stop` to `stop-cluster` across all relevant scripts and references. This improves naming clarity and consistency with other cluster management scripts. Updated all usages, checks, and permissions to use the new script name. No functional changes to cluster start/stop logic.
1 parent 313fd0d commit c686a28

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

.github/node_upgrade_pytest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ elif [ "$1" = "step2" ]; then
199199
# It is necessary to restart supervisord with new environment.
200200
"$STATE_CLUSTER/supervisorctl" stop all
201201
sleep 5
202-
"$STATE_CLUSTER/supervisord_stop"
202+
"$STATE_CLUSTER/stop-cluster"
203203
sleep 3
204204
"$STATE_CLUSTER/supervisord_start" || exit 6
205205
sleep 5

.github/stop_cluster_instances.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ stop_instances() {
66
local workdir="${1:?}"
77
for sc in "$workdir"/state-cluster*; do
88
[ -d "$sc" ] || continue
9-
"$sc/supervisord_stop" 2>/dev/null || :
9+
"$sc/stop-cluster" 2>/dev/null || :
1010
done
1111
}

cardano_node_tests/cluster_scripts/common/start-cluster-fast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ DELEG_SUPPLY="$((POOL_PLEDGE * NUM_POOLS + DELEG_MAGIC_VALUE))"
5555
NONDELEG_SUPPLY="$(( (MAX_SUPPLY - DELEG_SUPPLY) * 8 / 10))"
5656

5757
if [ -f "${STATE_CLUSTER}/supervisord.pid" ]; then
58-
echo "Cluster already running. Please run \`${SCRIPT_DIR}/stop-cluster\` first!" >&2
58+
echo "Cluster already running. Please run \`${STATE_CLUSTER}/stop-cluster\` first!" >&2
5959
exit 1
6060
fi
6161

@@ -534,7 +534,7 @@ cd "\${SCRIPT_DIR}/.."
534534
supervisord --config "\${SCRIPT_DIR}/supervisor.conf"
535535
EoF
536536

537-
cat > "${STATE_CLUSTER}/supervisord_stop" <<EoF
537+
cat > "${STATE_CLUSTER}/stop-cluster" <<EoF
538538
#!/usr/bin/env bash
539539
540540
set -uo pipefail
@@ -567,7 +567,7 @@ rm -f "\$PID_FILE"
567567
echo "Cluster terminated!"
568568
EoF
569569

570-
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*}
570+
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*,stop-cluster}
571571

572572
if [ -n "${DRY_RUN:-""}" ]; then
573573
echo "Dry run, not starting cluster"

cardano_node_tests/cluster_scripts/conway_slow/start-cluster

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [ "$POOL_COST" -eq 0 ]; then
4949
fi
5050

5151
if [ -f "${STATE_CLUSTER}/supervisord.pid" ]; then
52-
echo "Cluster already running. Please run \`${SCRIPT_DIR}/stop-cluster\` first!" >&2
52+
echo "Cluster already running. Please run \`${STATE_CLUSTER}/stop-cluster\` first!" >&2
5353
exit 1
5454
fi
5555

@@ -612,7 +612,7 @@ cd "\${SCRIPT_DIR}/.."
612612
supervisord --config "\${SCRIPT_DIR}/supervisor.conf"
613613
EoF
614614

615-
cat > "${STATE_CLUSTER}/supervisord_stop" <<EoF
615+
cat > "${STATE_CLUSTER}/stop-cluster" <<EoF
616616
#!/usr/bin/env bash
617617
618618
set -uo pipefail
@@ -645,7 +645,7 @@ rm -f "\$PID_FILE"
645645
echo "Cluster terminated!"
646646
EoF
647647

648-
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*}
648+
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*,stop-cluster}
649649

650650
if [ -n "${DRY_RUN:-""}" ]; then
651651
echo "Dry run, not starting cluster"

cardano_node_tests/cluster_scripts/testnets/start-cluster

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ "$SOCKET_PATH" != *"/state-cluster${INSTANCE_NUM}/"* ]]; then
1818
fi
1919

2020
if [ -f "$STATE_CLUSTER/supervisord.pid" ]; then
21-
echo "Cluster already running. Please run \`$SCRIPT_DIR/stop-cluster\` first!" >&2
21+
echo "Cluster already running. Please run \`${STATE_CLUSTER}/stop-cluster\` first!" >&2
2222
exit 1
2323
fi
2424

@@ -134,7 +134,7 @@ cd "\$SCRIPT_DIR/.."
134134
supervisord --config "\$SCRIPT_DIR/supervisor.conf"
135135
EoF
136136

137-
cat > "$STATE_CLUSTER/supervisord_stop" <<EoF
137+
cat > "$STATE_CLUSTER/stop-cluster" <<EoF
138138
#!/usr/bin/env bash
139139
140140
set -uo pipefail
@@ -167,7 +167,7 @@ rm -f "\$PID_FILE"
167167
echo "Cluster terminated!"
168168
EoF
169169

170-
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*}
170+
chmod u+x "$STATE_CLUSTER"/{supervisorctl*,supervisord_*,stop-cluster}
171171

172172
# copy db
173173
cp -r "$TESTNET_DIR/relay1-db" "$STATE_CLUSTER/db-relay1"
@@ -228,4 +228,4 @@ faucet_init_balance="$(get_address_balance \
228228
--address "$(<"$STATE_CLUSTER/shelley/faucet.addr")")"
229229
echo "Faucet initial balance: $faucet_init_balance" >> "$START_CLUSTER_LOG"
230230

231-
echo "Cluster started. Run \`$SCRIPT_DIR/stop-cluster\` to stop"
231+
echo "Cluster started"

cardano_node_tests/utils/cluster_scripts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Functionality for cluster scripts (starting and stopping clusters).
22
3-
* copying scripts and their configuration, so it can be atered by tests
3+
* copying scripts and their configuration, so it can be altered by tests
44
* setup of scripts and their configuration for starting of multiple cluster instances
55
"""
66

@@ -18,7 +18,7 @@
1818
from cardano_node_tests.utils import helpers
1919

2020
LOCAL_HOSTNAME = "node.local.gd"
21-
STOP_SCRIPT = "supervisord_stop"
21+
STOP_SCRIPT = "stop-cluster"
2222

2323

2424
@dataclasses.dataclass(frozen=True, order=True)

scripts/restart_dev_cluster.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ if [ -z "${DEV_CLUSTER_RUNNING:-}" ]; then
1111
exit 1
1212
fi
1313

14-
# check if "supervisord_stop" file exists in STATE_CLUSTER dir
15-
if [ ! -f "${STATE_CLUSTER}/supervisord_stop" ]; then
16-
echo "Cannot find '${STATE_CLUSTER}/supervisord_stop', exiting."
14+
# check if "stop-cluster" file exists in STATE_CLUSTER dir
15+
if [ ! -f "${STATE_CLUSTER}/stop-cluster" ]; then
16+
echo "Cannot find '${STATE_CLUSTER}/stop-cluster', exiting."
1717
exit 1
1818
fi
1919

20-
"$STATE_CLUSTER/supervisord_stop"
20+
"$STATE_CLUSTER/stop-cluster"
2121
sleep 2
2222

2323
"$STATE_CLUSTER/supervisord_start"

0 commit comments

Comments
 (0)