Description
In the bootstrap, --command is started backgrounded (pkg/launcher/bootstrap.go ~L627-660, deliberately, so spored starts), while the MPI user-data (EFA installer, root key exchange, peers file -> /tmp/mpi-hostfile) is appended after it and is still running. So a --command on an --mpi --efa cohort can start before:
- the EFA installer has finished (no libfabric efa provider yet),
/tmp/mpi-hostfileexists,- the peers' sshd has the root key (rank 0's mpirun fails "Permission denied" / host unreachable).
Rank 0's --mpi-command path papers over this with sleep 10, which is a race, not a barrier.
Suggested: after the MPI block completes on each node, write /etc/spawn/mpi-ready (and tag spawn:mpi-ready=true); on rank 0, run the user's mpi/command only after every peer reports ready (SSM, or a ssh probe loop to each hostfile IP). Document the file so --command users can while [ ! -f /etc/spawn/mpi-ready ]; do sleep 2; done.
Also: --command runs as the login user while the MPI keys are root's (/root/.ssh) and the mpirun path runs as root. Worth documenting that an MPI --command must sudo to use the keys.
Our interim wrapper polls for the hostfile, fi_info -p efa, and ssh-to-each-peer before mpirun.
Activity