Skip to content

Commit 540389f

Browse files
committed
wb | fix "*-notracer" profiles
1 parent d7634f3 commit 540389f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

nix/workbench/backend/supervisor.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,18 @@ case "$op" in
120120

121121
if jqtest '.node.tracing_backend == "trace-dispatcher"' "$dir"/profile.json
122122
then
123-
local basePort=$( envjq 'basePortTracer')
124-
local port_ekg=$(( basePort+$(envjq 'port_shift_ekg')))
125-
local port_prometheus=$((basePort+$(envjq 'port_shift_prometheus')))
126-
local port_rtview=$(( basePort+$(envjq 'port_shift_rtview')))
127-
cat <<EOF
123+
if jqtest '.node.trace_forwarding' "$dir"/profile.json
124+
then
125+
local basePort=$( envjq 'basePortTracer')
126+
local port_ekg=$(( basePort+$(envjq 'port_shift_ekg')))
127+
local port_prometheus=$((basePort+$(envjq 'port_shift_prometheus')))
128+
local port_rtview=$(( basePort+$(envjq 'port_shift_rtview')))
129+
cat <<EOF
128130
- EKG URL (node-0): http://localhost:$port_ekg/node-0
129131
- Prometheus URL (node-0): http://localhost:$port_prometheus/node-0
130132
- RTView URL (depending on cardano-tracer build): http://localhost:$port_rtview
131133
EOF
132-
134+
fi
133135
else cat <<EOF
134136
- EKG URL (node-0): http://localhost:12788
135137
- Prometheus URL (node-0): http://localhost:12798/metrics
@@ -224,7 +226,7 @@ EOF
224226
local usage="USAGE: wb backend $op RUN-DIR"
225227
local dir=${1:?$usage}; shift
226228

227-
if jqtest '.node.tracing_backend == "trace-dispatcher"' "$dir"/profile.json
229+
if jqtest '.node.tracing_backend == "trace-dispatcher" and .node.trace_forwarding' "$dir"/profile.json
228230
then if ! supervisorctl start tracer
229231
then progress "supervisor" "$(red fatal: failed to start) $(white cardano-tracer)"
230232
echo "$(red config.json) -------------------------------------" >&2
@@ -260,7 +262,7 @@ EOF
260262
--* ) msg "FATAL: unknown flag '$1'"; usage_supervisor;;
261263
* ) break;; esac; shift; done
262264

263-
ls -l $dir/{tracer/tracer,node-{0,1}/node}.socket || true
265+
ls -l $dir/node-{0,1}/node.socket || true
264266
if ! supervisorctl start healthcheck
265267
then progress "supervisor" "$(red fatal: failed to start) $(white healthcheck)"
266268
echo "$(red healthcheck stdout) -----------------------------------" >&2
@@ -281,7 +283,7 @@ EOF
281283
--* ) msg "FATAL: unknown flag '$1'"; usage_supervisor;;
282284
* ) break;; esac; shift; done
283285

284-
ls -l $dir/{tracer/tracer,node-{0,1}/node}.socket || true
286+
ls -l $dir/node-{0,1}/node.socket || true
285287
if ! supervisorctl start generator
286288
then progress "supervisor" "$(red fatal: failed to start) $(white generator)"
287289
echo "$(red run-script.json) ------------------------------------" >&2

0 commit comments

Comments
 (0)