The default socket used by munge, unmunge, remunge, and libmunge
to communicate with a particular munged is set at compile time.
The munge, unmunge, and remunge executables can override this default
with the "-S / --socket" command-line option, while libmunge can
use munge_ctx_set() with MUNGE_OPT_SOCKET.  This is typically used
to have clients connect to a particular munged when multiple MUNGE
daemons are running concurrently.

Since slurm-llnl uses the libmunge API, having munge/unmunge/remunge
query a config file won't help with this problem.

Trusting an environment variable for the location of the authentication
service socket would be a bad idea since a malicious program could
manipulate the environment.

The "/var/run" issue has been fixed in debian/ubuntu's 0.5.8-8:

  https://bugs.launchpad.net/ubuntu/+source/munge/+bug/227331
  https://bugs.launchpad.net/ubuntu/+source/munge/+bug/273765

The quickest fix is to set RAMRUN=no in /etc/default/rcS.
This disables the cleaning of /var/run during boot.  Ubuntu sets
RAMRUN=yes by default.

If you can't install 0.5.8-8, a slightly less quick fix is to edit
the /etc/init.d/munge script to create this directory when the
service is started.  Add something like this to the beginning of the
service_start() function:

  PIDDIR=`dirname "$PIDFILE"`
  if [ ! -d "$PIDDIR" ]; then
    mkdir -m 755 -p "$PIDDIR"
    [ -n "$USER" ] && chown "$USER" "$PIDDIR"
  fi

(Both the pidfile and socket reside under /var/run/munge by default.)

This is just a temporary fix.  I'll have munged create missing
directories in the next release (in progress, no ETA as of yet).

-Chris


On Tue, 2009-09-22 at 12:22pm EDT, Paul Joslin wrote:
> 
> This might not be useful enough to implement.  I was working around Ubuntu's
> "/var/run" problem, and tried to use /var/lib/munge as a socket dir.
> Obviously if -S is used to start the daemon, it must also be used by the
> clients / utilities.  This broke slurm-llnl, since it had no way of knowing
> a non-standard socket was used.
> 
> It would be nice if munge, unmunge, and remunge could get the socket info
> automatically.
> 
> Two possibilities:
> 1) They could read /etc/default/munge, and use "CLIENT_OPTIONS". e.g,
> CLIENT_OPTIONS="-S /var/lib/munge/socket.munge --force "
> 2) They could look for an environment variable, for example, "MUNGE_OPTS".
> MUNGE_OPTS="-S /var/lib/munge/socket.munge "; export MUNGE_OPTS
> 
> FWIW, the /var/run problem is claimed to be fixed in the next Ubuntu
> release, so this workaround would not be needed.

_______________________________________________
munge-users mailing list
[email protected]
https://mail.gna.org/listinfo/munge-users

Reply via email to