Guest User

Untitled

a guest
Jun 5th, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.89 KB | None | 0 0
  1. Connecting to phel002dc7155f1
  2. phel002dc7155f1 knife sudo password:
  3. Enter your password:
  4. phel002dc7155f1
  5. phel002dc7155f1 Starting first Chef Client run...
  6. phel002dc7155f1 Starting Chef Client, version 11.6.0
  7. phel002dc7155f1 resolving cookbooks for run list: ["mongodb::default"]
  8. phel002dc7155f1 Synchronizing Cookbooks:
  9. phel002dc7155f1 - mongodb
  10. phel002dc7155f1 - apt
  11. phel002dc7155f1 - yum
  12. phel002dc7155f1 - python
  13. phel002dc7155f1 - build-essential
  14. phel002dc7155f1 - yum-epel
  15. phel002dc7155f1 - runit
  16. phel002dc7155f1 Compiling Cookbooks...
  17. phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: CentOS doesn't provide mongodb, forcing use of 10gen repo
  18. phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Cloning resource attributes for template[/etc/mongodb.conf] from prior resource (CHEF-3694)
  19. 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'
  20. 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'
  21. phel002dc7155f1 [2014-06-05T11:28:41-07:00] WARN: Cloning resource attributes for template[/etc/init.d/mongod] from prior resource (CHEF-3694)
  22. 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'
  23. 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'
  24. phel002dc7155f1 Converging 11 resources
  25. phel002dc7155f1 Recipe: mongodb::10gen_repo
  26. phel002dc7155f1 * yum_repository[10gen] action createRecipe: <Dynamically Defined Resource>
  27. phel002dc7155f1 * template[/etc/yum.repos.d/10gen.repo] action create (up to date)
  28. phel002dc7155f1 * execute[yum-makecache-10gen] action nothing (skipped due to action :nothing)
  29. phel002dc7155f1 * ruby_block[yum-cache-reload-10gen] action nothing (skipped due to action :nothing)
  30. phel002dc7155f1 (up to date)
  31. phel002dc7155f1 Recipe: mongodb::install
  32. phel002dc7155f1 * file[/etc/sysconfig/mongodb] action create_if_missing (up to date)
  33. phel002dc7155f1 * template[/etc/mongodb.conf] action create_if_missing
  34. phel002dc7155f1 - create new file /etc/mongodb.conf
  35. phel002dc7155f1 - update content in file /etc/mongodb.conf from none to f9cee7
  36. phel002dc7155f1 --- /etc/mongodb.conf 2014-06-05 11:28:41.778001149 -0700
  37. phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-1rkazxf 2014-06-05 11:28:41.778001149 -0700
  38. phel002dc7155f1 @@ -0,0 +1,13 @@
  39. phel002dc7155f1 +#
  40. phel002dc7155f1 +# Automatically Generated by Chef, do not edit directly!
  41. phel002dc7155f1 +#
  42. phel002dc7155f1 +
  43. phel002dc7155f1 +bind_ip = 0.0.0.0
  44. phel002dc7155f1 +dbpath = /var/lib/mongodb
  45. phel002dc7155f1 +fork = true
  46. phel002dc7155f1 +logappend = true
  47. phel002dc7155f1 +logpath = /var/log/mongodb/mongodb.log
  48. phel002dc7155f1 +nojournal = false
  49. phel002dc7155f1 +port = 27017
  50. phel002dc7155f1 +rest = false
  51. phel002dc7155f1 +smallfiles = false
  52. phel002dc7155f1 - change mode from '' to '0644'
  53. phel002dc7155f1 - change owner from '' to 'root'
  54. phel002dc7155f1 - change group from '' to 'root'
  55. phel002dc7155f1
  56. phel002dc7155f1 * template[/etc/init.d/mongod] action create_if_missing
  57. phel002dc7155f1 - create new file /etc/init.d/mongod
  58. phel002dc7155f1 - update content in file /etc/init.d/mongod from none to 7b414a
  59. phel002dc7155f1 --- /etc/init.d/mongod 2014-06-05 11:28:41.855001149 -0700
  60. phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-93lh5n 2014-06-05 11:28:41.856001149 -0700
  61. phel002dc7155f1 @@ -0,0 +1,107 @@
  62. phel002dc7155f1 +#!/bin/bash
  63. phel002dc7155f1 +
  64. phel002dc7155f1 +# mongod - Startup script for mongod
  65. phel002dc7155f1 +
  66. phel002dc7155f1 +# chkconfig: 35 85 15
  67. phel002dc7155f1 +# description: Mongo is a scalable, document-oriented database.
  68. phel002dc7155f1 +# processname: mongod
  69. phel002dc7155f1 +# config: /etc/mongod.conf
  70. phel002dc7155f1 +# pidfile: /var/run/mongo/mongo.pid
  71. phel002dc7155f1 +
  72. phel002dc7155f1 +. /etc/rc.d/init.d/functions
  73. phel002dc7155f1 +
  74. phel002dc7155f1 +NAME=mongod
  75. phel002dc7155f1 +SYSCONFIG=/etc/sysconfig/mongodb
  76. phel002dc7155f1 +DAEMON_USER=mongod
  77. phel002dc7155f1 +ENABLE_MONGODB=yes
  78. phel002dc7155f1 +
  79. phel002dc7155f1 +SUBSYS_LOCK_FILE=/var/lock/subsys/mongod
  80. phel002dc7155f1 +
  81. phel002dc7155f1 +if [ -f "$SYSCONFIG" ]; then
  82. phel002dc7155f1 + . "$SYSCONFIG"
  83. phel002dc7155f1 +fi
  84. phel002dc7155f1 +
  85. phel002dc7155f1 +# FIXME: 1.9.x has a --shutdown flag that parses the config file and
  86. phel002dc7155f1 +# shuts down the correct running pid, but that's unavailable in 1.8
  87. phel002dc7155f1 +# for now. This can go away when this script stops supporting 1.8.
  88. phel002dc7155f1 +DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
  89. phel002dc7155f1 +PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
  90. phel002dc7155f1 +
  91. phel002dc7155f1 +# Handle NUMA access to CPUs (SERVER-3574)
  92. phel002dc7155f1 +# This verifies the existence of numactl as well as testing that the command works
  93. phel002dc7155f1 +NUMACTL_ARGS="--interleave=all"
  94. phel002dc7155f1 +if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
  95. phel002dc7155f1 +then
  96. phel002dc7155f1 + NUMACTL="numactl $NUMACTL_ARGS"
  97. phel002dc7155f1 +else
  98. phel002dc7155f1 + NUMACTL=""
  99. phel002dc7155f1 +fi
  100. phel002dc7155f1 +
  101. phel002dc7155f1 +start()
  102. phel002dc7155f1 +{
  103. phel002dc7155f1 + echo -n $"Starting mongod: "
  104. phel002dc7155f1 + daemon --user "$DAEMON_USER" $NUMACTL $DAEMON $DAEMON_OPTS
  105. phel002dc7155f1 + RETVAL=$?
  106. phel002dc7155f1 + echo
  107. phel002dc7155f1 + [ $RETVAL -eq 0 ] && touch $SUBSYS_LOCK_FILE
  108. phel002dc7155f1 +}
  109. phel002dc7155f1 +
  110. phel002dc7155f1 +stop()
  111. phel002dc7155f1 +{
  112. phel002dc7155f1 + echo -n $"Stopping mongod: "
  113. phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
  114. phel002dc7155f1 + killproc -p $PIDFILE -d 300 $DAEMON
  115. phel002dc7155f1 + else
  116. phel002dc7155f1 + killproc -d 300 $DAEMON
  117. phel002dc7155f1 + fi
  118. phel002dc7155f1 + RETVAL=$?
  119. phel002dc7155f1 + echo
  120. phel002dc7155f1 + [ $RETVAL -eq 0 ] && rm -f $SUBSYS_LOCK_FILE
  121. phel002dc7155f1 +}
  122. phel002dc7155f1 +
  123. phel002dc7155f1 +restart () {
  124. phel002dc7155f1 + stop
  125. phel002dc7155f1 + start
  126. phel002dc7155f1 +}
  127. phel002dc7155f1 +
  128. phel002dc7155f1 +ulimit -f unlimited
  129. phel002dc7155f1 +ulimit -t unlimited
  130. phel002dc7155f1 +ulimit -v unlimited
  131. phel002dc7155f1 +ulimit -n 64000
  132. phel002dc7155f1 +ulimit -m unlimited
  133. phel002dc7155f1 +ulimit -u 32000
  134. phel002dc7155f1 +
  135. phel002dc7155f1 +RETVAL=0
  136. phel002dc7155f1 +
  137. phel002dc7155f1 +if test "x$ENABLE_MONGODB" != "xyes"; then
  138. phel002dc7155f1 + exit $RETVAL
  139. phel002dc7155f1 +fi
  140. phel002dc7155f1 +
  141. phel002dc7155f1 +case "$1" in
  142. phel002dc7155f1 + start)
  143. phel002dc7155f1 + start
  144. phel002dc7155f1 + ;;
  145. phel002dc7155f1 + stop)
  146. phel002dc7155f1 + stop
  147. phel002dc7155f1 + ;;
  148. phel002dc7155f1 + restart|reload|force-reload)
  149. phel002dc7155f1 + restart
  150. phel002dc7155f1 + ;;
  151. phel002dc7155f1 + condrestart)
  152. phel002dc7155f1 + [ -f $SUBSYS_LOCK_FILE ] && restart || :
  153. phel002dc7155f1 + ;;
  154. phel002dc7155f1 + status)
  155. phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
  156. phel002dc7155f1 + status -p $PIDFILE $DAEMON
  157. phel002dc7155f1 + else
  158. phel002dc7155f1 + status $DAEMON
  159. phel002dc7155f1 + fi
  160. phel002dc7155f1 + RETVAL=$?
  161. phel002dc7155f1 + ;;
  162. phel002dc7155f1 + *)
  163. phel002dc7155f1 + echo "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
  164. phel002dc7155f1 + RETVAL=1
  165. phel002dc7155f1 +esac
  166. phel002dc7155f1 +
  167. phel002dc7155f1 +exit $RETVAL
  168. phel002dc7155f1 +
  169. phel002dc7155f1 - change mode from '' to '0755'
  170. phel002dc7155f1 - change owner from '' to 'root'
  171. phel002dc7155f1 - change group from '' to 'root'
  172. phel002dc7155f1
  173. phel002dc7155f1 * package[mongo-10gen-server] action install
  174. phel002dc7155f1 - install version 2.4.10-mongodb_1 of package mongo-10gen-server
  175. phel002dc7155f1
  176. phel002dc7155f1 Recipe: mongodb::default
  177. phel002dc7155f1 * template[/etc/sysconfig/mongodb] action create (up to date)
  178. phel002dc7155f1 * template[/etc/mongodb.conf] action create (up to date)
  179. phel002dc7155f1 * directory[/var/log/mongodb] action create (up to date)
  180. phel002dc7155f1 * directory[/var/lib/mongodb] action create (up to date)
  181. phel002dc7155f1 * template[/etc/init.d/mongod] action create
  182. phel002dc7155f1 - update content in file /etc/init.d/mongod from e64814 to 7b414a
  183. phel002dc7155f1 --- /etc/init.d/mongod 2014-05-09 13:36:38.000000000 -0700
  184. phel002dc7155f1 +++ /tmp/chef-rendered-template20140605-31195-t4v915 2014-06-05 11:28:50.295001149 -0700
  185. phel002dc7155f1 @@ -6,32 +6,26 @@
  186. phel002dc7155f1 # description: Mongo is a scalable, document-oriented database.
  187. phel002dc7155f1 # processname: mongod
  188. phel002dc7155f1 # config: /etc/mongod.conf
  189. phel002dc7155f1 -# pidfile: /var/run/mongodb/mongod.pid
  190. phel002dc7155f1 +# pidfile: /var/run/mongo/mongo.pid
  191. phel002dc7155f1
  192. phel002dc7155f1 . /etc/rc.d/init.d/functions
  193. phel002dc7155f1
  194. phel002dc7155f1 -# things from mongod.conf get there by mongod reading it
  195. phel002dc7155f1 +NAME=mongod
  196. phel002dc7155f1 +SYSCONFIG=/etc/sysconfig/mongodb
  197. phel002dc7155f1 +DAEMON_USER=mongod
  198. phel002dc7155f1 +ENABLE_MONGODB=yes
  199. phel002dc7155f1
  200. phel002dc7155f1 +SUBSYS_LOCK_FILE=/var/lock/subsys/mongod
  201. phel002dc7155f1
  202. phel002dc7155f1 -# NOTE: if you change any OPTIONS here, you get what you pay for:
  203. phel002dc7155f1 -# this script assumes all options are in the config file.
  204. phel002dc7155f1 -CONFIGFILE="/etc/mongod.conf"
  205. phel002dc7155f1 -OPTIONS=" -f $CONFIGFILE"
  206. phel002dc7155f1 -SYSCONFIG="/etc/sysconfig/mongod"
  207. phel002dc7155f1 +if [ -f "$SYSCONFIG" ]; then
  208. phel002dc7155f1 + . "$SYSCONFIG"
  209. phel002dc7155f1 +fi
  210. phel002dc7155f1
  211. phel002dc7155f1 # FIXME: 1.9.x has a --shutdown flag that parses the config file and
  212. phel002dc7155f1 # shuts down the correct running pid, but that's unavailable in 1.8
  213. phel002dc7155f1 # for now. This can go away when this script stops supporting 1.8.
  214. phel002dc7155f1 DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
  215. phel002dc7155f1 PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
  216. phel002dc7155f1 -mongod=${MONGOD-/usr/bin/mongod}
  217. phel002dc7155f1 -
  218. phel002dc7155f1 -MONGO_USER=mongod
  219. phel002dc7155f1 -MONGO_GROUP=mongod
  220. phel002dc7155f1 -
  221. phel002dc7155f1 -if [ -f "$SYSCONFIG" ]; then
  222. phel002dc7155f1 - . "$SYSCONFIG"
  223. phel002dc7155f1 -fi
  224. phel002dc7155f1
  225. phel002dc7155f1 # Handle NUMA access to CPUs (SERVER-3574)
  226. phel002dc7155f1 # This verifies the existence of numactl as well as testing that the command works
  227. phel002dc7155f1 @@ -45,40 +39,44 @@
  228. phel002dc7155f1
  229. phel002dc7155f1 start()
  230. phel002dc7155f1 {
  231. phel002dc7155f1 - # Recommended ulimit values for mongod or mongos
  232. phel002dc7155f1 - # See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
  233. phel002dc7155f1 - #
  234. phel002dc7155f1 - ulimit -f unlimited
  235. phel002dc7155f1 - ulimit -t unlimited
  236. phel002dc7155f1 - ulimit -v unlimited
  237. phel002dc7155f1 - ulimit -n 64000
  238. phel002dc7155f1 - ulimit -m unlimited
  239. phel002dc7155f1 - ulimit -u 32000
  240. phel002dc7155f1 -
  241. phel002dc7155f1 echo -n $"Starting mongod: "
  242. phel002dc7155f1 - daemon --user "$MONGO_USER" "$NUMACTL $mongod $OPTIONS >/dev/null 2>&1"
  243. phel002dc7155f1 + daemon --user "$DAEMON_USER" $NUMACTL $DAEMON $DAEMON_OPTS
  244. phel002dc7155f1 RETVAL=$?
  245. phel002dc7155f1 echo
  246. phel002dc7155f1 - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mongod
  247. phel002dc7155f1 + [ $RETVAL -eq 0 ] && touch $SUBSYS_LOCK_FILE
  248. phel002dc7155f1 }
  249. phel002dc7155f1
  250. phel002dc7155f1 stop()
  251. phel002dc7155f1 {
  252. phel002dc7155f1 echo -n $"Stopping mongod: "
  253. phel002dc7155f1 - killproc -p "$PIDFILE" -d 300 /usr/bin/mongod
  254. phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
  255. phel002dc7155f1 + killproc -p $PIDFILE -d 300 $DAEMON
  256. phel002dc7155f1 + else
  257. phel002dc7155f1 + killproc -d 300 $DAEMON
  258. phel002dc7155f1 + fi
  259. phel002dc7155f1 RETVAL=$?
  260. phel002dc7155f1 echo
  261. phel002dc7155f1 - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/mongod
  262. phel002dc7155f1 + [ $RETVAL -eq 0 ] && rm -f $SUBSYS_LOCK_FILE
  263. phel002dc7155f1 }
  264. phel002dc7155f1
  265. phel002dc7155f1 restart () {
  266. phel002dc7155f1 - stop
  267. phel002dc7155f1 - start
  268. phel002dc7155f1 + stop
  269. phel002dc7155f1 + start
  270. phel002dc7155f1 }
  271. phel002dc7155f1
  272. phel002dc7155f1 +ulimit -f unlimited
  273. phel002dc7155f1 +ulimit -t unlimited
  274. phel002dc7155f1 +ulimit -v unlimited
  275. phel002dc7155f1 +ulimit -n 64000
  276. phel002dc7155f1 +ulimit -m unlimited
  277. phel002dc7155f1 +ulimit -u 32000
  278. phel002dc7155f1
  279. phel002dc7155f1 RETVAL=0
  280. phel002dc7155f1
  281. phel002dc7155f1 +if test "x$ENABLE_MONGODB" != "xyes"; then
  282. phel002dc7155f1 + exit $RETVAL
  283. phel002dc7155f1 +fi
  284. phel002dc7155f1 +
  285. phel002dc7155f1 case "$1" in
  286. phel002dc7155f1 start)
  287. phel002dc7155f1 start
  288. phel002dc7155f1 @@ -90,10 +88,14 @@
  289. phel002dc7155f1 restart
  290. phel002dc7155f1 ;;
  291. phel002dc7155f1 condrestart)
  292. phel002dc7155f1 - [ -f /var/lock/subsys/mongod ] && restart || :
  293. phel002dc7155f1 + [ -f $SUBSYS_LOCK_FILE ] && restart || :
  294. phel002dc7155f1 ;;
  295. phel002dc7155f1 status)
  296. phel002dc7155f1 - status $mongod
  297. phel002dc7155f1 + if test "x$PIDFILE" != "x"; then
  298. phel002dc7155f1 + status -p $PIDFILE $DAEMON
  299. phel002dc7155f1 + else
  300. phel002dc7155f1 + status $DAEMON
  301. phel002dc7155f1 + fi
  302. phel002dc7155f1 RETVAL=$?
  303. phel002dc7155f1 ;;
  304. phel002dc7155f1 *)
  305. phel002dc7155f1 @@ -102,3 +104,4 @@
  306. phel002dc7155f1 esac
  307. phel002dc7155f1
  308. phel002dc7155f1 exit $RETVAL
  309. phel002dc7155f1 +
  310. phel002dc7155f1
  311. phel002dc7155f1 * service[mongod] action enable (up to date)
  312. phel002dc7155f1 * service[mongod] action start
  313. phel002dc7155f1 - start service service[mongod]
  314. phel002dc7155f1
  315. phel002dc7155f1 * service[mongod] action restart
  316. phel002dc7155f1 - restart service service[mongod]
  317. phel002dc7155f1
  318. phel002dc7155f1 Chef Client finished, 6 resources updated
Advertisement
Add Comment
Please, Sign In to add comment