Avoid call to slurm_get_slurmd_user_id() in _step_connect() if not slurmd.
For a stray socket, this call would cause nss_slurm to deadlock, as any calling path that leads to slurm_conf_lock(), which will call getpwuid(), which will re-enter the nss_slurm code, which will end up back here but with the slurm_conf_lock already held, at which point the process will never continue. For nss_slurm, this means a node rebooting with stale sockets will hang in the middle of the init process, which is a rather unpleasant experience. So - only handle the stray socket cleanup within the slurmd process itself. Bug 7030
Please register or sign in to comment