Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

XX-10433 - more bugs with using redhat mongo of 10gens

  • Loading branch information...
commit bec87267886deb7e9fbc88504969f4fd8fea0bf3 1 parent d15793e
@ezuce-admin ezuce-admin authored
View
3  mak/modules.mk.in
@@ -38,7 +38,8 @@ sipx = \
sipXpage \
sipXpolycom \
sipXrls \
- sipXsaa
+ sipXsaa \
+ sipXrelease
# re: ruby-postgres, there's a new one we should be using ruby-pgsql i
# think it's called as ruby-postgres is obsoleted.
View
21 sipXmongo/bin/mongodb-repair.in 100644 → 100755
@@ -1,4 +1,4 @@
-#@BASH@
+#
# did mongod stop abruptly? then there's a good change database is
# needs to be repaired. Repairing is normal, however, by definition
@@ -8,11 +8,18 @@
# the application layer, or recreate itself eventually like phone
# registrations.
-CONFIG_FILE="/etc/mongod.conf"
-DB_PATH=`awk -F= '/^dbpath=/{print $2}' "$CONFIG_FILE"`
+if `id mongodb 1>/dev/null 2>&1` ; then
+ CONFIG_FILE="/etc/mongodb.conf"
+ MONGO_USER=mongodb
+ MONGO_GROUP=mongodb
+else
+ CONFIG_FILE="/etc/mongod.conf"
+ MONGO_USER=mongod
+ MONGO_GROUP=mongod
+fi
+DBPATH=`awk -F= '/^dbpath *= */{print $2}' "$CONFIG_FILE"`
# NOTE: mongod conveniently stores pid in lock file
-LOCK_FILE="$DB_PATH/mongod.lock"
-MONGO_USER=mongod
+LOCK_FILE="$DBPATH/mongod.lock"
Action=FORCE_REPAIR
while [ $# -ne 0 ]
@@ -62,8 +69,8 @@ obliterate_db() {
echo "obliterating database"
/etc/init.d/mongod stop 2>/dev/null
! test -f $LOCK_FILE || rm -f $LOCK_FILE
- ! test /var/lib/mongo || rm -rf /var/lib/mongo/*
- chown mongod:mongod /var/lib/mongo
+ ! test $DBPATH || rm -rf $DBPATH/*
+ chown "${MONGO_USER}:${MONGO_GROUP}" $DBPATH
/etc/init.d/mongod start
}
View
6 sipXmongo/etc/mongodb.cf
@@ -158,7 +158,7 @@ bundle agent mongodb_arbiter_running {
vars:
any::
"service" string => "$(sipx.SIPX_SERVICEDIR)/mongod-arbiter";
- "service_command" string => "/usr/bin/mongod -f $(mongodb.config_arbiter)";
+ "service_command" string => "/usr/bin/mongod.*-f\s+$(mongodb.config_arbiter)";
methods:
any::
@@ -185,11 +185,11 @@ bundle agent mongodb_sysv_running {
vars:
any::
"service" string => "/etc/init.d/mongod";
- "service_command" string => "/usr/bin/mongod -f $(mongodb.config)";
+ "service_command" string => "/usr/bin/mongod.*-f\s+$(mongodb.config)";
methods:
any::
- "any" usebundle => find_service_by_command("$(service_command)", "mongodb_running","mongod");
+ "any" usebundle => find_service_by_command("$(service_command)", "mongodb_running","$(mongodb.user)");
commands:
!mongod.mongodb_running::
Please sign in to comment.
Something went wrong with that request. Please try again.