Skip to content

Commit

Permalink
etc/rc: avoid flux module cmd --rank option
Browse files Browse the repository at this point in the history
In preparation for dropping the flux module cmd --rank
option, stop using it in rc scripts.

When the target is "-r 0", just drop the argument since
that is the default.  When the target is something else,
use flux exec to accomplish the same thing.
  • Loading branch information
garlick authored and mergify-bot committed Jan 10, 2020
1 parent 187fce7 commit f6db56c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
29 changes: 16 additions & 13 deletions etc/rc1
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@

pids=""

flux module load -r all barrier
flux module load -r 0 content-sqlite
flux module load -r 0 kvs
flux module load -r all -x 0 kvs
flux module load -r all kvs-watch
flux module load -r all job-info
flux module load -r all aggregator
flux exec -r all flux module load barrier

flux module load content-sqlite

flux module load kvs
flux exec -r all -x 0 flux module load kvs
flux exec -r all flux module load kvs-watch

flux exec -r all flux module load job-info
flux exec -r all flux module load aggregator

flux hwloc reload & pids="$pids $!"

flux module load -r 0 cron sync=hb
flux module load cron sync=hb

flux module load -r 0 userdb ${FLUX_USERDB_OPTIONS}
flux module load userdb ${FLUX_USERDB_OPTIONS}

flux module load -r all job-ingest
flux module load -r 0 job-manager
flux module load -r 0 job-exec
flux module load -r 0 sched-simple
flux exec -r all flux module load job-ingest
flux module load job-manager
flux module load job-exec
flux module load sched-simple

wait $pids

Expand Down
26 changes: 13 additions & 13 deletions etc/rc3
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ for rcdir in $all_dirs; do
done
shopt -u nullglob

flux module remove -r 0 sched-simple
flux module remove -r 0 job-exec
flux module remove -r 0 job-manager
flux module remove -r all job-ingest
flux module remove sched-simple
flux module remove job-exec
flux module remove job-manager
flux exec -r all flux module remove job-ingest

if PERSISTDIR=$(flux getattr persist-directory 2>/dev/null); then
/bin/true; # XXX: nothing to persist?
fi

flux module remove -r 0 userdb
flux module remove userdb

flux module remove -r 0 cron
flux module remove -r all aggregator
flux module remove -r all barrier
flux module remove cron
flux exec -r all flux module remove aggregator
flux exec -r all flux module remove barrier

flux module remove -r all job-info
flux module remove -r all kvs-watch
flux module remove -r all -x 0 kvs
flux exec -r all flux module remove job-info
flux exec -r all flux module remove kvs-watch
flux exec -r all -x 0 flux module remove kvs
if test -n "$PERSISTDIR"; then
flux kvs getroot >${PERSISTDIR}/kvsroot.final
flux content flush
fi
flux module remove -r 0 kvs
flux module remove -r 0 content-sqlite
flux module remove kvs
flux module remove content-sqlite

0 comments on commit f6db56c

Please sign in to comment.