Skip to content

Commit 4587725

Browse files
committed
print log on service start failure
1 parent 86b3b7f commit 4587725

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dask/dask.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ function install_systemd_dask_scheduler() {
869869
#!/bin/bash
870870
LOGFILE="/var/log/${DASK_SCHEDULER_SERVICE}.log"
871871
echo "dask scheduler starting, logging to \${LOGFILE}"
872-
${DASK_CONDA_ENV}/bin/dask-scheduler >> "\${LOGFILE}" 2>&1
872+
${DASK_CONDA_ENV}/bin/dask scheduler >> "\${LOGFILE}" 2>&1
873873
EOF
874874

875875
chmod 750 "${DASK_SCHEDULER_LAUNCHER}"
@@ -1278,6 +1278,10 @@ function main() {
12781278
if [[ "$(hostname -s)" == "${MASTER}" ]]; then
12791279
date
12801280
time systemctl start "${DASK_SCHEDULER_SERVICE}"
1281+
local substate_val="$(systemctl show ${DASK_SCHEDULER_SERVICE} -p SubState --value)"
1282+
if [[ "${substate_val}" != 'running' ]] ; then
1283+
cat "/var/log/${DASK_SCHEDULER_SERVICE}.log"
1284+
fi
12811285
systemctl status "${DASK_SCHEDULER_SERVICE}"
12821286
fi
12831287

@@ -1292,6 +1296,10 @@ function main() {
12921296
if [[ "${retries}" == "0" ]] ; then echo "dask scheduler unreachable" ; exit 1 ; fi
12931297
done
12941298
time systemctl start "${DASK_WORKER_SERVICE}"
1299+
local substate_val="$(systemctl show ${DASK_WORKER_SERVICE} -p SubState --value)"
1300+
if [[ "${substate_val}" != 'running' ]] ; then
1301+
cat "/var/log/${DASK_WORKER_SERVICE}.log"
1302+
fi
12951303
systemctl status "${DASK_WORKER_SERVICE}"
12961304
fi
12971305

0 commit comments

Comments
 (0)