Skip to content

Commit

Permalink
Merge pull request #3177 from garlick/rc_sched
Browse files Browse the repository at this point in the history
rc: load sched-simple only if no other scheduler is loaded
  • Loading branch information
mergify[bot] committed Sep 8, 2020
2 parents 9665e57 + 92a5944 commit 8b84b47
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion etc/rc1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ declare -a pids
flux module load job-ingest
flux exec -r all -x 0 flux module load job-ingest & pids+=($!)
flux module load job-exec & pids+=($!)
flux module load sched-simple & pids+=($!)
wait_check ${pids[@]}
unset pids

Expand All @@ -55,6 +54,15 @@ for rcdir in $all_dirs; do
done
shopt -u nullglob

# Print module that has registered 'sched' service, if any
lookup_sched_module() {
flux module list | awk '$6 == "sched" { print $1 }'
}

if test "${FLUX_SCHED_MODULE}" != "none" -a -z "$(lookup_sched_module)"; then
flux module load ${FLUX_SCHED_MODULE:-sched-simple}
fi

flux admin cleanup-push <<-EOT
flux queue stop --quiet
flux job cancelall --user=all --quiet -f --states RUN
Expand Down

0 comments on commit 8b84b47

Please sign in to comment.