Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb_instance with different names using the same sysconfig file(which in turn force using the same mongo conf file) #416

Open
manojVivek opened this issue Aug 30, 2016 · 1 comment

Comments

@manojVivek
Copy link

manojVivek commented Aug 30, 2016

I am creating a new mongo instance using the following recipe:

mongodb_instance "test_mongo" do
        port 11111
        dbpath "/mongo_data"
end

Running this recipe made following:

Created /etc/sysconfig/mongodb with content:

#
# Automatically Generated by Chef, do not edit directly!
#

CONFIGFILE="/etc/mongodb.conf"
DAEMON="/usr/bin/$NAME"
DAEMONUSER="mongod"
DAEMON_OPTS="--config /etc/mongodb.conf"
DAEMON_USER="mongod"
ENABLE_MONGO="yes"
ENABLE_MONGOD="yes"
ENABLE_MONGODB="yes"

Created /etc/mongodb.conf with content:

#
# Automatically Generated by Chef, do not edit directly!
#

bind_ip = 0.0.0.0
dbpath = /var/lib/mongodb
fork = true
logappend = true
logpath = /var/log/mongodb/mongodb.log
nojournal = false
pidfilepath = /var/run/mongodb/mongodb.pid
port = 27017
rest = false
smallfiles = false

Created a /etc/init.d/test_mongo with usual content.

Here in the above generated files, the configs that I have mentioned(port and datapath) were not considered.

Also if I run the following recipe with new name test_mongo_new also the same files are created except a new init.d file is created. Other config files were same.

mongodb_instance "test_mongo_new" do
        port 11111
        dbpath "/mongo_data"
end

Is this the intended behaviour?
What is wrong here?

@josephholsten
Copy link

This repo is EOL, but the code lives on at https://github.com/sous-chefs/mongodb. Could you give that cookbook a look and let us know if it doesn't fix your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants