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
32 lines
663 B
Bash
Executable File
32 lines
663 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
cat > /lib/systemd/system/mongod.service << '_EOF_'
|
|
[Unit]
|
|
Description=High-performance, schema-free document-oriented database
|
|
After=network.target check-numa.service
|
|
Wants=check-numa.service
|
|
Documentation=https://docs.mongodb.org/manual
|
|
|
|
[Service]
|
|
User=mongodb
|
|
Group=mongodb
|
|
RuntimeDirectory=mongodb
|
|
EnvironmentFile=/etc/numactl.env
|
|
ExecStart=/bin/bash -c "${NUMACTL} /usr/bin/mongod --quiet --config /etc/mongod.conf"
|
|
LimitFSIZE=infinity
|
|
LimitCPU=infinity
|
|
LimitAS=infinity
|
|
LimitNOFILE=64000
|
|
LimitRSS=infinity
|
|
LimitNPROC=64000
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
_EOF_
|
|
|
|
systemctl daemon-reload
|
|
systemctl enable mongod.service
|