environs/cloudinit: bootstrap machine has two mongodb proceses

Bug #1210407 reported by Dave Cheney
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Medium
Dave Cheney

Bug Description

ubuntu@ip-10-165-35-246:~$ /var/lib/juju/tools/machine-0/jujud version
1.13.1-precise-amd64
ubuntu@ip-10-165-35-246:~$ pgrep -lf mongo
9770 /usr/bin/mongod --config /etc/mongodb.conf
9872 /usr/bin/mongod --auth --dbpath=/var/lib/juju/db --sslOnNormalPorts --sslPEMKeyFile /var/lib/juju/server.pem --sslPEMKeyPassword xxxxxxx --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles

As part of cloud init we need to disable the default mongodb upstart script that comes with the package.

Tags: papercut

Related branches

Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Haw Loeung (hloeung) wrote :

Hi,

We had issues with bootstrapping of new environments in Canonistack. Eventually traced it down to the default instance of m1.tiny having only 2GB of storage and the second mongodb created all these prealloc[1] files filling up disk space.

ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$ ls -la
total 3145748
drwxr-xr-x 2 mongodb nogroup 4096 Sep 26 05:21 .
drwxr-xr-x 3 mongodb mongodb 4096 Sep 26 05:21 ..
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 j._0
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 prealloc.1
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 prealloc.2

ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$ ps afx | grep mongo
 7511 pts/2 S+ 0:00 \_ grep --color=auto mongo
 7217 ? Ssl 0:05 /usr/bin/mongod --config /etc/mongodb.conf
 7319 ? Ssl 0:01 /usr/bin/mongod --auth --dbpath=/var/lib/juju/db --sslOnNormalPorts --sslPEMKeyFile /var/lib/juju/server.pem --sslPEMKeyPassword xxxxxxx --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles
ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$

We managed to work around it by re-deploying with the 'root-disk' constraint set but it would be nice to have this fixed. Would shipping out a /etc/default/mongodb file with ENABLE_MONGODB="no" fix this?

Thanks,

Haw

[1] http://serverfault.com/questions/329574/run-a-mongodb-configuration-server-without-3gb-of-journal-files

Revision history for this message
Haw Loeung (hloeung) wrote :
Changed in juju-core:
assignee: nobody → Dave Cheney (dave-cheney)
status: Triaged → In Progress
Changed in juju-core:
milestone: none → dev-docs
milestone: dev-docs → 1.15.0
tags: added: papercut
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.