Merge branch 'stable-2.13'

* stable-2.13:
  Change kind cache: Don't fail if prior ps has no parent, but next ps has 1 parent
  Make Gerrit startup timeout configurable

Change-Id: I2e6a53eb33cbe2e3059e65bd72bf80ff65fc2f3b
This commit is contained in:
David Pursehouse
2016-12-22 07:12:26 +00:00
2 changed files with 22 additions and 12 deletions

View File

@@ -1347,6 +1347,12 @@ Used on Gerrit slave installations. If set to true the Gerrit JVM is
called with the '--slave' switch, enabling slave mode. If no value is
set (or any other value), Gerrit defaults to master mode.
[[container.startupTimeout]]container.startupTimeout::
+
The maximum time (in seconds) to wait for a gerrit.sh start command
to run a new Gerrit daemon successfully. If not set, defaults to
90 seconds.
[[container.user]]container.user::
+
Login name (or UID) of the operating system user the Gerrit JVM

View File

@@ -288,6 +288,9 @@ test -z "$GERRIT_FDS" && GERRIT_FDS=128
GERRIT_FDS=`expr $GERRIT_FDS + $GERRIT_FDS`
test $GERRIT_FDS -lt 1024 && GERRIT_FDS=1024
GERRIT_STARTUP_TIMEOUT=`get_config --get container.startupTimeout`
test -z "$GERRIT_STARTUP_TIMEOUT" && GERRIT_STARTUP_TIMEOUT=90 # seconds
GERRIT_USER=`get_config --get container.user`
#####################################################
@@ -434,7 +437,7 @@ case "$ACTION" in
fi
fi
TIMEOUT=90 # seconds
TIMEOUT="$GERRIT_STARTUP_TIMEOUT"
sleep 1
while running "$GERRIT_PID" && test $TIMEOUT -gt 0 ; do
if test "x$RUN_ID" = "x`cat $GERRIT_RUN 2>/dev/null`" ; then
@@ -526,17 +529,18 @@ case "$ACTION" in
check|status)
echo "Checking arguments to Gerrit Code Review:"
echo " GERRIT_SITE = $GERRIT_SITE"
echo " GERRIT_CONFIG = $GERRIT_CONFIG"
echo " GERRIT_PID = $GERRIT_PID"
echo " GERRIT_TMP = $GERRIT_TMP"
echo " GERRIT_WAR = $GERRIT_WAR"
echo " GERRIT_FDS = $GERRIT_FDS"
echo " GERRIT_USER = $GERRIT_USER"
echo " JAVA = $JAVA"
echo " JAVA_OPTIONS = $JAVA_OPTIONS"
echo " RUN_EXEC = $RUN_EXEC $RUN_Arg1 '$RUN_Arg2' $RUN_Arg3"
echo " RUN_ARGS = $RUN_ARGS"
echo " GERRIT_SITE = $GERRIT_SITE"
echo " GERRIT_CONFIG = $GERRIT_CONFIG"
echo " GERRIT_PID = $GERRIT_PID"
echo " GERRIT_TMP = $GERRIT_TMP"
echo " GERRIT_WAR = $GERRIT_WAR"
echo " GERRIT_FDS = $GERRIT_FDS"
echo " GERRIT_USER = $GERRIT_USER"
echo " GERRIT_STARTUP_TIMEOUT = $GERRIT_STARTUP_TIMEOUT"
echo " JAVA = $JAVA"
echo " JAVA_OPTIONS = $JAVA_OPTIONS"
echo " RUN_EXEC = $RUN_EXEC $RUN_Arg1 '$RUN_Arg2' $RUN_Arg3"
echo " RUN_ARGS = $RUN_ARGS"
echo
if test -f "$GERRIT_PID" ; then