We have several issues on mongodb element for xenial. This change propose these actions: - fix a typo on check-numa script. - fix variable issue on the systemd parameter ExecStart. - create a dependency and an order between numa-check and mongo service. Closes-bug: #1743612 Change-Id: I50123dad58b9a368f528d086fa28f6abc86464a6
25 lines
637 B
Bash
Executable File
25 lines
637 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
mkdir -p /usr/share/mongodb
|
|
|
|
cat > /usr/share/mongodb/check-numa.sh << '_EOF_'
|
|
#!/bin/sh
|
|
# Handle NUMA access to CPUs (SERVER-3574)
|
|
# This verifies the existence of numactl as well as testing that the command works
|
|
# Then it generates an environment file for systemd
|
|
NUMACTL_ARGS="--interleave=all"
|
|
if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
|
|
then
|
|
echo -n NUMACTL="$(which numactl) $NUMACTL_ARGS" > /etc/numactl.env
|
|
else
|
|
echo -n NUMACTL="" > /etc/numactl.env
|
|
fi
|
|
_EOF_
|
|
|
|
chmod 755 /usr/share/mongodb/check-numa.sh
|