Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connecting to phel002dc7155f1
- phel002dc7155f1 knife sudo password:
- Enter your password:
- phel002dc7155f1
- phel002dc7155f1 Starting first Chef Client run...
- phel002dc7155f1 Starting Chef Client, version 11.6.0
- phel002dc7155f1 resolving cookbooks for run list: ["mongodb::default"]
- phel002dc7155f1 Synchronizing Cookbooks:
- phel002dc7155f1 - mongodb
- phel002dc7155f1 - apt
- phel002dc7155f1 - yum
- phel002dc7155f1 - python
- phel002dc7155f1 - build-essential
- phel002dc7155f1 - yum-epel
- phel002dc7155f1 - runit
- phel002dc7155f1 Compiling Cookbooks...
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: CentOS doesn't provide mongodb, forcing use of 10gen repo
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Cloning resource attributes for template[/etc/mongodb.conf] from prior resource (CHEF-3694)
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Previous template[/etc/mongodb.conf]: /var/chef/cache/cookbooks/mongodb/recipes/install.rb:14:in `from_file'
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Current template[/etc/mongodb.conf]: /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:139:in `block in from_file'
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Cloning resource attributes for template[/etc/init.d/mongod] from prior resource (CHEF-3694)
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Previous template[/etc/init.d/mongod]: /var/chef/cache/cookbooks/mongodb/recipes/install.rb:35:in `from_file'
- phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Current template[/etc/init.d/mongod]: /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:171:in `block in from_file'
- phel002dc7155f1 Converging 11 resources
- phel002dc7155f1 Recipe: mongodb::10gen_repo
- phel002dc7155f1 * yum_repository[10gen] action createRecipe: <Dynamically Defined Resource>
- phel002dc7155f1 * template[/etc/yum.repos.d/10gen.repo] action create (up to date)
- phel002dc7155f1 * execute[yum-makecache-10gen] action nothing (skipped due to action :nothing)
- phel002dc7155f1 * ruby_block[yum-cache-reload-10gen] action nothing (skipped due to action :nothing)
- phel002dc7155f1 (up to date)
- phel002dc7155f1 Recipe: mongodb::install
- phel002dc7155f1 * file[/etc/sysconfig/mongodb] action create_if_missing (up to date)
- phel002dc7155f1 * template[/etc/mongodb.conf] action create_if_missing
- phel002dc7155f1 - create new file /etc/mongodb.conf
- phel002dc7155f1 - update content in file /etc/mongodb.conf from none to f9cee7
- phel002dc7155f1 --- /etc/mongodb.conf 2014-06-05 11:28:41.778001149 -0700
- phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-1rkazxf 2014-06-05 11:28:41.778001149 -0700
- phel002dc7155f1 @@ -0,0 +1,13 @@
- phel002dc7155f1 +#
- phel002dc7155f1 +# Automatically Generated by Chef, do not edit directly!
- phel002dc7155f1 +#
- phel002dc7155f1 +
- phel002dc7155f1 +bind_ip = 0.0.0.0
- phel002dc7155f1 +dbpath = /var/lib/mongodb
- phel002dc7155f1 +fork = true
- phel002dc7155f1 +logappend = true
- phel002dc7155f1 +logpath = /var/log/mongodb/mongodb.log
- phel002dc7155f1 +nojournal = false
- phel002dc7155f1 +port = 27017
- phel002dc7155f1 +rest = false
- phel002dc7155f1 +smallfiles = false
- phel002dc7155f1 - change mode from '' to '0644'
- phel002dc7155f1 - change owner from '' to 'root'
- phel002dc7155f1 - change group from '' to 'root'
- phel002dc7155f1
- phel002dc7155f1 * template[/etc/init.d/mongod] action create_if_missing
- phel002dc7155f1 - create new file /etc/init.d/mongod
- phel002dc7155f1 - update content in file /etc/init.d/mongod from none to 7b414a
- phel002dc7155f1 --- /etc/init.d/mongod 2014-06-05 11:28:41.855001149 -0700
- phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-93lh5n 2014-06-05 11:28:41.856001149 -0700
- phel002dc7155f1 @@ -0,0 +1,107 @@
- phel002dc7155f1 +#!/bin/bash
- phel002dc7155f1 +
- phel002dc7155f1 +# mongod - Startup script for mongod
- phel002dc7155f1 +
- phel002dc7155f1 +# chkconfig: 35 85 15
- phel002dc7155f1 +# description: Mongo is a scalable, document-oriented database.
- phel002dc7155f1 +# processname: mongod
- phel002dc7155f1 +# config: /etc/mongod.conf
- phel002dc7155f1 +# pidfile: /var/run/mongo/mongo.pid
- phel002dc7155f1 +
- phel002dc7155f1 +. /etc/rc.d/init.d/functions
- phel002dc7155f1 +
- phel002dc7155f1 +NAME=mongod
- phel002dc7155f1 +SYSCONFIG=/etc/sysconfig/mongodb
- phel002dc7155f1 +DAEMON_USER=mongod
- phel002dc7155f1 +ENABLE_MONGODB=yes
- phel002dc7155f1 +
- phel002dc7155f1 +SUBSYS_LOCK_FILE=/var/lock/subsys/mongod
- phel002dc7155f1 +
- phel002dc7155f1 +if [ -f "$SYSCONFIG" ]; then
- phel002dc7155f1 + . "$SYSCONFIG"
- phel002dc7155f1 +fi
- phel002dc7155f1 +
- phel002dc7155f1 +# FIXME: 1.9.x has a --shutdown flag that parses the config file and
- phel002dc7155f1 +# shuts down the correct running pid, but that's unavailable in 1.8
- phel002dc7155f1 +# for now. This can go away when this script stops supporting 1.8.
- phel002dc7155f1 +DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
- phel002dc7155f1 +PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
- phel002dc7155f1 +
- phel002dc7155f1 +# Handle NUMA access to CPUs (SERVER-3574)
- phel002dc7155f1 +# This verifies the existence of numactl as well as testing that the command works
- phel002dc7155f1 +NUMACTL_ARGS="--interleave=all"
- phel002dc7155f1 +if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
- phel002dc7155f1 +then
- phel002dc7155f1 + NUMACTL="numactl $NUMACTL_ARGS"
- phel002dc7155f1 +else
- phel002dc7155f1 + NUMACTL=""
- phel002dc7155f1 +fi
- phel002dc7155f1 +
- phel002dc7155f1 +start()
- phel002dc7155f1 +{
- phel002dc7155f1 + echo -n $"Starting mongod: "
- phel002dc7155f1 + daemon --user "$DAEMON_USER" $NUMACTL $DAEMON $DAEMON_OPTS
- phel002dc7155f1 + RETVAL=$?
- phel002dc7155f1 + echo
- phel002dc7155f1 + [ $RETVAL -eq 0 ] && touch $SUBSYS_LOCK_FILE
- phel002dc7155f1 +}
- phel002dc7155f1 +
- phel002dc7155f1 +stop()
- phel002dc7155f1 +{
- phel002dc7155f1 + echo -n $"Stopping mongod: "
- phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
- phel002dc7155f1 + killproc -p $PIDFILE -d 300 $DAEMON
- phel002dc7155f1 + else
- phel002dc7155f1 + killproc -d 300 $DAEMON
- phel002dc7155f1 + fi
- phel002dc7155f1 + RETVAL=$?
- phel002dc7155f1 + echo
- phel002dc7155f1 + [ $RETVAL -eq 0 ] && rm -f $SUBSYS_LOCK_FILE
- phel002dc7155f1 +}
- phel002dc7155f1 +
- phel002dc7155f1 +restart () {
- phel002dc7155f1 + stop
- phel002dc7155f1 + start
- phel002dc7155f1 +}
- phel002dc7155f1 +
- phel002dc7155f1 +ulimit -f unlimited
- phel002dc7155f1 +ulimit -t unlimited
- phel002dc7155f1 +ulimit -v unlimited
- phel002dc7155f1 +ulimit -n 64000
- phel002dc7155f1 +ulimit -m unlimited
- phel002dc7155f1 +ulimit -u 32000
- phel002dc7155f1 +
- phel002dc7155f1 +RETVAL=0
- phel002dc7155f1 +
- phel002dc7155f1 +if test "x$ENABLE_MONGODB" != "xyes"; then
- phel002dc7155f1 + exit $RETVAL
- phel002dc7155f1 +fi
- phel002dc7155f1 +
- phel002dc7155f1 +case "$1" in
- phel002dc7155f1 + start)
- phel002dc7155f1 + start
- phel002dc7155f1 + ;;
- phel002dc7155f1 + stop)
- phel002dc7155f1 + stop
- phel002dc7155f1 + ;;
- phel002dc7155f1 + restart|reload|force-reload)
- phel002dc7155f1 + restart
- phel002dc7155f1 + ;;
- phel002dc7155f1 + condrestart)
- phel002dc7155f1 + [ -f $SUBSYS_LOCK_FILE ] && restart || :
- phel002dc7155f1 + ;;
- phel002dc7155f1 + status)
- phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
- phel002dc7155f1 + status -p $PIDFILE $DAEMON
- phel002dc7155f1 + else
- phel002dc7155f1 + status $DAEMON
- phel002dc7155f1 + fi
- phel002dc7155f1 + RETVAL=$?
- phel002dc7155f1 + ;;
- phel002dc7155f1 + *)
- phel002dc7155f1 + echo "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
- phel002dc7155f1 + RETVAL=1
- phel002dc7155f1 +esac
- phel002dc7155f1 +
- phel002dc7155f1 +exit $RETVAL
- phel002dc7155f1 +
- phel002dc7155f1 - change mode from '' to '0755'
- phel002dc7155f1 - change owner from '' to 'root'
- phel002dc7155f1 - change group from '' to 'root'
- phel002dc7155f1
- phel002dc7155f1 * package[mongo-10gen-server] action install
- phel002dc7155f1 - install version 2.4.10-mongodb_1 of package mongo-10gen-server
- phel002dc7155f1
- phel002dc7155f1 Recipe: mongodb::default
- phel002dc7155f1 * template[/etc/sysconfig/mongodb] action create (up to date)
- phel002dc7155f1 * template[/etc/mongodb.conf] action create (up to date)
- phel002dc7155f1 * directory[/var/log/mongodb] action create (up to date)
- phel002dc7155f1 * directory[/var/lib/mongodb] action create (up to date)
- phel002dc7155f1 * template[/etc/init.d/mongod] action create
- phel002dc7155f1 - update content in file /etc/init.d/mongod from e64814 to 7b414a
- phel002dc7155f1 --- /etc/init.d/mongod 2014-05-09 13:36:38.000000000 -0700
- phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-t4v915 2014-06-05 11:28:50.295001149 -0700
- phel002dc7155f1 @@ -6,32 +6,26 @@
- phel002dc7155f1 # description: Mongo is a scalable, document-oriented database.
- phel002dc7155f1 # processname: mongod
- phel002dc7155f1 # config: /etc/mongod.conf
- phel002dc7155f1 -# pidfile: /var/run/mongodb/mongod.pid
- phel002dc7155f1 +# pidfile: /var/run/mongo/mongo.pid
- phel002dc7155f1
- phel002dc7155f1 . /etc/rc.d/init.d/functions
- phel002dc7155f1
- phel002dc7155f1 -# things from mongod.conf get there by mongod reading it
- phel002dc7155f1 +NAME=mongod
- phel002dc7155f1 +SYSCONFIG=/etc/sysconfig/mongodb
- phel002dc7155f1 +DAEMON_USER=mongod
- phel002dc7155f1 +ENABLE_MONGODB=yes
- phel002dc7155f1
- phel002dc7155f1 +SUBSYS_LOCK_FILE=/var/lock/subsys/mongod
- phel002dc7155f1
- phel002dc7155f1 -# NOTE: if you change any OPTIONS here, you get what you pay for:
- phel002dc7155f1 -# this script assumes all options are in the config file.
- phel002dc7155f1 -CONFIGFILE="/etc/mongod.conf"
- phel002dc7155f1 -OPTIONS=" -f $CONFIGFILE"
- phel002dc7155f1 -SYSCONFIG="/etc/sysconfig/mongod"
- phel002dc7155f1 +if [ -f "$SYSCONFIG" ]; then
- phel002dc7155f1 + . "$SYSCONFIG"
- phel002dc7155f1 +fi
- phel002dc7155f1
- phel002dc7155f1 # FIXME: 1.9.x has a --shutdown flag that parses the config file and
- phel002dc7155f1 # shuts down the correct running pid, but that's unavailable in 1.8
- phel002dc7155f1 # for now. This can go away when this script stops supporting 1.8.
- phel002dc7155f1 DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
- phel002dc7155f1 PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
- phel002dc7155f1 -mongod=${MONGOD-/usr/bin/mongod}
- phel002dc7155f1 -
- phel002dc7155f1 -MONGO_USER=mongod
- phel002dc7155f1 -MONGO_GROUP=mongod
- phel002dc7155f1 -
- phel002dc7155f1 -if [ -f "$SYSCONFIG" ]; then
- phel002dc7155f1 - . "$SYSCONFIG"
- phel002dc7155f1 -fi
- phel002dc7155f1
- phel002dc7155f1 # Handle NUMA access to CPUs (SERVER-3574)
- phel002dc7155f1 # This verifies the existence of numactl as well as testing that the command works
- phel002dc7155f1 @@ -45,40 +39,44 @@
- phel002dc7155f1
- phel002dc7155f1 start()
- phel002dc7155f1 {
- phel002dc7155f1 - # Recommended ulimit values for mongod or mongos
- phel002dc7155f1 - # See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
- phel002dc7155f1 - #
- phel002dc7155f1 - ulimit -f unlimited
- phel002dc7155f1 - ulimit -t unlimited
- phel002dc7155f1 - ulimit -v unlimited
- phel002dc7155f1 - ulimit -n 64000
- phel002dc7155f1 - ulimit -m unlimited
- phel002dc7155f1 - ulimit -u 32000
- phel002dc7155f1 -
- phel002dc7155f1 echo -n $"Starting mongod: "
- phel002dc7155f1 - daemon --user "$MONGO_USER" "$NUMACTL $mongod $OPTIONS >/dev/null 2>&1"
- phel002dc7155f1 + daemon --user "$DAEMON_USER" $NUMACTL $DAEMON $DAEMON_OPTS
- phel002dc7155f1 RETVAL=$?
- phel002dc7155f1 echo
- phel002dc7155f1 - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mongod
- phel002dc7155f1 + [ $RETVAL -eq 0 ] && touch $SUBSYS_LOCK_FILE
- phel002dc7155f1 }
- phel002dc7155f1
- phel002dc7155f1 stop()
- phel002dc7155f1 {
- phel002dc7155f1 echo -n $"Stopping mongod: "
- phel002dc7155f1 - killproc -p "$PIDFILE" -d 300 /usr/bin/mongod
- phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
- phel002dc7155f1 + killproc -p $PIDFILE -d 300 $DAEMON
- phel002dc7155f1 + else
- phel002dc7155f1 + killproc -d 300 $DAEMON
- phel002dc7155f1 + fi
- phel002dc7155f1 RETVAL=$?
- phel002dc7155f1 echo
- phel002dc7155f1 - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/mongod
- phel002dc7155f1 + [ $RETVAL -eq 0 ] && rm -f $SUBSYS_LOCK_FILE
- phel002dc7155f1 }
- phel002dc7155f1
- phel002dc7155f1 restart () {
- phel002dc7155f1 - stop
- phel002dc7155f1 - start
- phel002dc7155f1 + stop
- phel002dc7155f1 + start
- phel002dc7155f1 }
- phel002dc7155f1
- phel002dc7155f1 +ulimit -f unlimited
- phel002dc7155f1 +ulimit -t unlimited
- phel002dc7155f1 +ulimit -v unlimited
- phel002dc7155f1 +ulimit -n 64000
- phel002dc7155f1 +ulimit -m unlimited
- phel002dc7155f1 +ulimit -u 32000
- phel002dc7155f1
- phel002dc7155f1 RETVAL=0
- phel002dc7155f1
- phel002dc7155f1 +if test "x$ENABLE_MONGODB" != "xyes"; then
- phel002dc7155f1 + exit $RETVAL
- phel002dc7155f1 +fi
- phel002dc7155f1 +
- phel002dc7155f1 case "$1" in
- phel002dc7155f1 start)
- phel002dc7155f1 start
- phel002dc7155f1 @@ -90,10 +88,14 @@
- phel002dc7155f1 restart
- phel002dc7155f1 ;;
- phel002dc7155f1 condrestart)
- phel002dc7155f1 - [ -f /var/lock/subsys/mongod ] && restart || :
- phel002dc7155f1 + [ -f $SUBSYS_LOCK_FILE ] && restart || :
- phel002dc7155f1 ;;
- phel002dc7155f1 status)
- phel002dc7155f1 - status $mongod
- phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
- phel002dc7155f1 + status -p $PIDFILE $DAEMON
- phel002dc7155f1 + else
- phel002dc7155f1 + status $DAEMON
- phel002dc7155f1 + fi
- phel002dc7155f1 RETVAL=$?
- phel002dc7155f1 ;;
- phel002dc7155f1 *)
- phel002dc7155f1 @@ -102,3 +104,4 @@
- phel002dc7155f1 esac
- phel002dc7155f1
- phel002dc7155f1 exit $RETVAL
- phel002dc7155f1 +
- phel002dc7155f1
- phel002dc7155f1 * service[mongod] action enable (up to date)
- phel002dc7155f1 * service[mongod] action start
- phel002dc7155f1 - start service service[mongod]
- phel002dc7155f1
- phel002dc7155f1 * service[mongod] action restart
- phel002dc7155f1 - restart service service[mongod]
- phel002dc7155f1
- phel002dc7155f1 Chef Client finished, 6 resources updated
Advertisement
Add Comment
Please, Sign In to add comment