Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7737

Error in init.d with numactl command on debian 6

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2.1
    • Component/s: Packaging
    • None
    • Environment:
      Linux debian 6x
    • Linux

      Hello,

      We have a replica set of 3 mongo server running on 3 hosts under debian 6x linux.
      They were running with mongodb 2.0.2 and we are trying a migration to mongodb 2.2.1.

      On test cluster everything went fine.
      On prod cluster, we modified the init.d script some time ago to correctly handle NUMA options.

      In mongodb 2.2.1, the numa is directly handled in the script delivered by the package with the following lines;

      1. Handle NUMA access to CPUs (SERVER-3574)
      2. This verifies the existence of numactl as well as testing that the command works
        NUMACTL_ARGS="--interleave=all"
        if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
        then
        NUMACTL="numactl $NUMACTL_ARGS"
        else
        NUMACTL=""
        fi
        ...
        start_server() {
      3. Start the process using the wrapper
        start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
        --make-pidfile --chuid $DAEMONUSER \
        --exec $NUMACTL $DAEMON – $DAEMON_OPTS
        errcode=$?
        return $errcode
        }

      Unfortunately, this does not work, I get the error: "unrecognized option '--interleave=all'"

      After some investigation it seems that the '--' is badly placed and the init.d script should instead contain the following lines:

      1. Handle NUMA access to CPUs (SERVER-3574)
      2. This verifies the existence of numactl as well as testing that the command works
        NUMACTL_ARGS="--interleave=all"
        if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
        then
      3. NUMACTL="numactl $NUMACTL_ARGS"
        NUMACTL="/usr/bin/numactl – $NUMACTL_ARGS"
        else
        NUMACTL=""
        fi
        ...
        start_server() {
      4. Start the process using the wrapper
        start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
        --make-pidfile --chuid $DAEMONUSER \
        --exec $NUMACTL $DAEMON $DAEMON_OPTS
        errcode=$?
        return $errcode
        }

      Could you please fix it in later mongodb releases/patches?

      Regards

            Assignee:
            akshay@mongodb.com Akshay Kumar
            Reporter:
            gdegremont Guillaume Degremont
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: