Enable http daemon in slave mode

Also add the --headless option to make sure Gerrit isn't even trying
to serve the UI.

For historical reasons, http daemon wasn't enabled in the slave mode.
A reason for that is that, in Gerrit's early versions, it wasn't
possible to both run the http daemon and not serve the UI.

Slaves are read-only and disposable. They are used for two purposes:
* reduce latency on remote sites
* off-load clone/fetch traffic from Gerrit master

Git/HTTP is the best protocol to allow a flexible allocation of slaves,
because supports proxying and URL-based redirection.

Change-Id: Ic5568b4e8e005d660a9f61931831c39d270a9ef1
This commit is contained in:
Saša Živkov
2018-02-05 11:00:46 +01:00
parent 7229c9d50c
commit 34001e4dbe

View File

@@ -346,7 +346,7 @@ fi
test -z "$GERRIT_USER" && GERRIT_USER=`whoami`
RUN_ARGS="-jar $GERRIT_WAR daemon -d $GERRIT_SITE"
if test "`get_config --bool container.slave`" = "true" ; then
RUN_ARGS="$RUN_ARGS --slave"
RUN_ARGS="$RUN_ARGS --slave --enable-httpd --headless"
fi
DAEMON_OPTS=`get_config --get-all container.daemonOpt`
if test -n "$DAEMON_OPTS" ; then