mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
a30357d21e
* feat(storage): add multipart put stage metrics * feat(scripts): add multipart put focus runner * docs(operations): add multipart put server-path guides * chore(scripts): add local rustfs restart helper * docs(observability): add local metrics backend guide * docs(observability): add localized multipart guides * fix(ecstore): validate multipart batching path * feat(obs): add erasure encode overlap metrics * docs(ops): update overlap retest summary * docs(ops): add batchblocks retest matrix * docs(ops): extend overlap candidate summary * docs(ops): capture 8-run overlap summary * feat(storage): switch rename_data to msgpack map * test(storage): add rename_data payload checks * feat(object): add zero_copy_eager put path * docs(ops): add zero_copy_eager put guide * docs(ops): add deeper zero-copy next steps
82 lines
2.6 KiB
Bash
82 lines
2.6 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
PIDFILE=/private/tmp/issue708-single-node-multidisk/rustfs.pid
|
|
LOGFILE=/private/tmp/issue708-single-node-multidisk/rustfs.log
|
|
RUSTFS_CMD_PATTERN='target/debug/rustfs server /private/tmp/issue708-single-node-multidisk/d1 /private/tmp/issue708-single-node-multidisk/d2 /private/tmp/issue708-single-node-multidisk/d3 /private/tmp/issue708-single-node-multidisk/d4'
|
|
|
|
mkdir -p /private/tmp/issue708-single-node-multidisk/{d1,d2,d3,d4}
|
|
|
|
if [[ -f "$PIDFILE" ]]; then
|
|
old_pid="$(cat "$PIDFILE")"
|
|
if kill -0 "$old_pid" >/dev/null 2>&1; then
|
|
kill "$old_pid" >/dev/null 2>&1 || true
|
|
sleep 2
|
|
fi
|
|
fi
|
|
|
|
lingering_pids="$(pgrep -f "$RUSTFS_CMD_PATTERN" || true)"
|
|
if [[ -n "$lingering_pids" ]]; then
|
|
while IFS= read -r lingering_pid; do
|
|
[[ -z "$lingering_pid" ]] && continue
|
|
kill "$lingering_pid" >/dev/null 2>&1 || true
|
|
done <<< "$lingering_pids"
|
|
sleep 2
|
|
fi
|
|
|
|
if [[ -n "${RUSTFS_TUNING_ENV_FILE:-}" && -f "${RUSTFS_TUNING_ENV_FILE:-}" ]]; then
|
|
set -a
|
|
source "$RUSTFS_TUNING_ENV_FILE"
|
|
set +a
|
|
fi
|
|
|
|
launch_rustfs() {
|
|
if command -v setsid >/dev/null 2>&1; then
|
|
setsid env \
|
|
RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true \
|
|
RUSTFS_ADDRESS=127.0.0.1:9000 \
|
|
RUSTFS_ACCESS_KEY=rustfsadmin \
|
|
RUSTFS_SECRET_KEY=rustfsadmin \
|
|
RUSTFS_RPC_SECRET=rustfs-rpc-secret \
|
|
RUSTFS_REGION=us-east-1 \
|
|
RUSTFS_CONSOLE_ENABLE=false \
|
|
RUSTFS_OBS_ENDPOINT=http://127.0.0.1:4318 \
|
|
target/debug/rustfs server \
|
|
/private/tmp/issue708-single-node-multidisk/d1 \
|
|
/private/tmp/issue708-single-node-multidisk/d2 \
|
|
/private/tmp/issue708-single-node-multidisk/d3 \
|
|
/private/tmp/issue708-single-node-multidisk/d4 \
|
|
</dev/null >"$LOGFILE" 2>&1 &
|
|
else
|
|
nohup env \
|
|
RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true \
|
|
RUSTFS_ADDRESS=127.0.0.1:9000 \
|
|
RUSTFS_ACCESS_KEY=rustfsadmin \
|
|
RUSTFS_SECRET_KEY=rustfsadmin \
|
|
RUSTFS_RPC_SECRET=rustfs-rpc-secret \
|
|
RUSTFS_REGION=us-east-1 \
|
|
RUSTFS_CONSOLE_ENABLE=false \
|
|
RUSTFS_OBS_ENDPOINT=http://127.0.0.1:4318 \
|
|
target/debug/rustfs server \
|
|
/private/tmp/issue708-single-node-multidisk/d1 \
|
|
/private/tmp/issue708-single-node-multidisk/d2 \
|
|
/private/tmp/issue708-single-node-multidisk/d3 \
|
|
/private/tmp/issue708-single-node-multidisk/d4 \
|
|
</dev/null >"$LOGFILE" 2>&1 &
|
|
fi
|
|
}
|
|
|
|
launch_rustfs
|
|
|
|
new_pid=$!
|
|
sleep 5
|
|
|
|
actual_pid="$(pgrep -f "$RUSTFS_CMD_PATTERN" | head -n 1 || true)"
|
|
if [[ -z "$actual_pid" ]]; then
|
|
echo "failed to locate restarted rustfs process; launcher pid was $new_pid" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "$actual_pid" > "$PIDFILE"
|
|
curl -fsS http://127.0.0.1:9000/health >/dev/null
|