Skip to content

Commit 30fead3

Browse files
committed
workbench: fix for the new relative dirs
1 parent 5e9d444 commit 30fead3

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

Diff for: nix/workbench/backend/nomad.sh

+27-9
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,15 @@ backend_nomad() {
818818
if test "${nomad_environment}" != "cloud"
819819
then
820820
# A link to the alloc must be already created inside the RUN-DIR
821-
ln -s "${dir}"/nomad/alloc/"${node}"/local/run/current/"${node}"/stdout "${dir}"/"${node}"/stdout
822-
ln -s "${dir}"/nomad/alloc/"${node}"/local/run/current/"${node}"/stderr "${dir}"/"${node}"/stderr
823-
ln -s "${dir}"/nomad/alloc/"${node}"/local/run/current/supervisor/supervisord.log "${dir}"/supervisor/"${node}"/supervisord.log
821+
ln -s \
822+
../nomad/alloc/"${node}"/local/run/current/"${node}"/stdout \
823+
"${dir}"/"${node}"/stdout
824+
ln -s \
825+
../nomad/alloc/"${node}"/local/run/current/"${node}"/stderr \
826+
"${dir}"/"${node}"/stderr
827+
ln -s \
828+
../nomad/alloc/"${node}"/local/run/current/supervisor/supervisord.log \
829+
"${dir}"/supervisor/"${node}"/supervisord.log
824830
fi
825831
# Always wait for the node to be ready.
826832
backend_nomad wait-node "${dir}" "${node}"
@@ -867,8 +873,12 @@ backend_nomad() {
867873
local nomad_environment=$(envjqr 'nomad_environment')
868874
if test "${nomad_environment}" != "cloud"
869875
then
870-
ln -s "${dir}"/nomad/alloc/node-0/local/run/current/generator/stdout "${dir}"/generator/stdout
871-
ln -s "${dir}"/nomad/alloc/node-0/local/run/current/generator/stderr "${dir}"/generator/stderr
876+
ln -s \
877+
../nomad/alloc/node-0/local/run/current/generator/stdout \
878+
"${dir}"/generator/stdout
879+
ln -s \
880+
../nomad/alloc/node-0/local/run/current/generator/stderr \
881+
"${dir}"/generator/stderr
872882
fi
873883
# It was "intentionally started and should not automagically stop" flag!
874884
touch "${dir}"/generator/started
@@ -935,14 +945,22 @@ backend_nomad() {
935945
then
936946
if test "${one_tracer_per_node}" = "true" || test "${task}" != "tracer"
937947
then
938-
ln -s "${dir}"/nomad/alloc/"${task}"/local/run/current/tracer/stdout "${dir}"/tracer/"${task}"/stdout
939-
ln -s "${dir}"/nomad/alloc/"${task}"/local/run/current/tracer/stderr "${dir}"/tracer/"${task}"/stderr
948+
ln -s \
949+
../../nomad/alloc/"${task}"/local/run/current/tracer/stdout \
950+
"${dir}"/tracer/"${task}"/stdout
951+
ln -s \
952+
../../nomad/alloc/"${task}"/local/run/current/tracer/stderr \
953+
"${dir}"/tracer/"${task}"/stderr
940954
else
941955
# When "local" and "podman" "tracer" folder is mounted
942956
if ! test "${nomad_task_driver}" = "podman"
943957
then
944-
ln -s "${dir}"/nomad/alloc/tracer/local/run/current/tracer/stdout "${dir}"/tracer/stdout
945-
ln -s "${dir}"/nomad/alloc/tracer/local/run/current/tracer/stderr "${dir}"/tracer/stderr
958+
ln -s \
959+
../nomad/alloc/tracer/local/run/current/tracer/stdout \
960+
"${dir}"/tracer/stdout
961+
ln -s \
962+
../nomad/alloc/tracer/local/run/current/tracer/stderr \
963+
"${dir}"/tracer/stderr
946964
fi
947965
ln -s "${dir}"/nomad/alloc/tracer/local/run/current/supervisor/supervisord.log "${dir}"/supervisor/tracer/supervisord.log
948966
fi

0 commit comments

Comments
 (0)