-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
Description
Your setup
Formula commit hash / release tag
Versions reports (master & minion)
Pillar / config used
wanted:
database:
- mongod
- shell
pkg:
deps:
- python3-pip
database:
mongod:
version: 4.4.1
use_upstream: 'archive'
config:
storage:
dbPath: /var/lib/mongodb/mongod
Bug details
Describe the bug
I'm attempting to install a reasonably standard installation of MongoDB on Ubuntu 20.04 using this formula (obviously).
Unless I'm mistaken, with MongoDB 4.4.1 (the latest version at the time of writing), is not using the conf file that this formula creates in /etc/mongodb/mongod.conf. The symptom it presents is the daemon failing to start and the following error in the system journal:
"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."
If you edit the systemd unit file in /lib/systemd/system/mongod.service and change the ExecStart= line to the following, it works:
ExecStart=/usr/local/mongodb/mongod-4.4.1/bin/mongod -f /etc/mongodb/mongod.conf
I'm happy to create a PR that adds the command line argument but I'm not sure of:
- Does this only effect mongodb versions newer than some version? If so, Which version?
- I don't have access to systems other than Ubuntu to test on. If the GitHub automated testing handles other platforms, great, if not, I'll need some help testing.