[SERVER-7737] Error in init.d with numactl command on debian 6 Created: 21/Nov/12  Updated: 14/Feb/13  Resolved: 14/Feb/13

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Guillaume Degremont Assignee: Akshay Kumar
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux debian 6x


Issue Links:
Duplicate
duplicates SERVER-6008 numactl in debian init script seems t... Closed
Operating System: Linux
Participants:

 Description   

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



 Comments   
Comment by Matt Pippitt [ 25/Jan/13 ]

I'm seeing this same issue, so I'm having to manage the script with puppet so mongo will start on numa enabled systems.

Generated at Thu Feb 08 03:15:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.