-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.6.0
-
Component/s: Packaging
-
Linux
-
Build Team 2.7.0, BUILD 2.7.1, BUILD 2.8.0-rc2
In 2.6, MongoDB now supports YAML configuration files.
The /etc/rc.d/init.d/mongod script in the mongodb-org RPM package doesn't work because of the following line that parses the pidfile path from the config file:
PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
The above line doesn't correctly parse YAML configuration files, so the init.d script is unable to retrieve the pidfile needed to stop the mongod service.
The regex should be modified to cover both old and new style configuration files. The following works for YAML files:
PIDFILE=`awk -F: '/^[[:blank:]]*pidFilePath[[:blank:]]*:[[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d ' '`
- is duplicated by
-
SERVER-15796 "/etc/init/mongod stop" not working
- Closed
-
SERVER-14095 CentOS 6 init script unable to stop mongod if pidfile line contains whitespace
- Closed
- is related to
-
SERVER-18060 init.d script for cents does not support YAML config therefore cannot configure WiredTiger
- Closed
- related to
-
SERVER-14247 init script now set env var PIDFILEPATH but still used PIDFILE
- Closed
-
SERVER-16720 Init script in Red Hat fails if using YAML inline syntax
- Closed
-
SERVER-16731 Remove unused DBPATH init script variable
- Closed