-
Notifications
You must be signed in to change notification settings - Fork 3
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
Set the log path, config path, data path to the default 10 gen repo #262
base: master
Are you sure you want to change the base?
Conversation
if you don't want the values to be set, you can set them to be 'nil' in the attributes. The default values are set for a minor level of backwards compatibility (and due to demo by 10gen). I am curious as to why your config/log/data are duplicated, what is your platform and run-list? |
@jamesonjlee Thanks for the reply.
I know. I just wanted to point out that if we try this cookbook with default option on amazon linux, we got duplicated config files, and warnings. You can close my pull req if is not necessary. platform is amazon linux
|
I'll give the duplicate directory issue on Amazon Linux (this shouldn't be happening since this would be in rhel family). |
I guess you're saying that the package installation creates the following files:
Which are different than the default paths in this cookbook. I'd personally rather have the defaults match the newest package from mongodb than historical defaults. But as this would be backwards incompatible, and I seriously don't want to write migration code, this should wait for the next major (breaking) release. I've created a tracking ticket for these in #308. |
For those who need a work around, these are the relevant updated attributes: default['mongodb']['dbconfig_file'] = '/etc/mongod.conf'
default['mongodb']['config']['logpath'] = '/var/log/mongo/mongod.log'
default['mongodb']['config']['dbpath'] = '/var/lib/mongo'
default['mongodb']['sysconfig_file'] = '/etc/default/mongod'
default['mongodb']['default_init_name'] = 'mongod'
default['mongodb']['instance_name'] = 'mongod' |
Well I'm enjoying my coworkers fighting with this. Do we know which packages use which set of paths? This is a terrible user experience, especially after a restart. |
I know the ones for ubuntu (and probably debian). I guess we could just have kitchen find out for rhel, debian, source(?). |
👍 |
At late as 16.2 at least this still happens, and its especially a pain in the rear because on the first install, the upstart script that comes with the package is run, so the one from the template can't start. You need to manually stop / start the old / new upstart services to make it recognize the changes and run with the right config files. |
I am running into this now as well. Frustrating to say the least. Any idea how far this PR is off from fixing some of this stuff or if it ever has any plans to be merged? Been open for a long while now. |
When we chef solo this cookbook, we will get duplicated mongo log, config file, and data dir and it's quite frustrating.
I am not sure why you will use different paths for these.
So I changed:
Config
/etc/mongodb.conf -> /etc/mongod.conf
Log
/var/log/mongodb/mongodb.log -> /var/log/mongo/mongod.log
Data
/var/lib/mongodb -> /var/lib/mongo
Also, with latest mongo (2.9.x), we will see warnings when we start the mongo:
So I set the default value of
nojournal
,rest
,smallfiles
, andbind_ip
tonil
.