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) #112

Open
manojVivek opened this issue Aug 30, 2016 · 3 comments
Milestone

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?

@jkulak
Copy link

jkulak commented Sep 8, 2016

Yes, same here.

@damacus damacus added this to the 1.1.0 milestone Dec 17, 2016
@damacus
Copy link
Member

damacus commented Dec 17, 2016

I'm adding this to the first bug-fix release (1.1.0) after the 1.0.0 rewrite, as to not make the rewrite an abolsolute slog.

If in the mean time you can rewrite some tests to cover this in inspec that'd be great!

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
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

4 participants