mirror of https://github.com/apache/lucene.git
SOLR-6509: Solr start scripts interactive mode doesn't honor -z argument
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1626847 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5703c00949
commit
4e7cc1a695
|
@ -192,6 +192,8 @@ Bug Fixes
|
|||
* SOLR-6484: SolrCLI's healthcheck action needs to check live nodes as part of reporting
|
||||
the status of a replica (Timothy Potter)
|
||||
|
||||
* SOLR-6509: Solr start scripts interactive mode doesn't honor -z argument (Timothy Potter)
|
||||
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
|
|
@ -698,11 +698,11 @@ if [ "$SOLR_MODE" == "solrcloud" ]; then
|
|||
fi
|
||||
|
||||
CLOUD_MODE_OPTS="$CLOUD_MODE_OPTS -DzkRun"
|
||||
|
||||
# and if collection1 needs to be bootstrapped
|
||||
if [ -e "$SOLR_HOME/collection1/core.properties" ]; then
|
||||
CLOUD_MODE_OPTS="$CLOUD_MODE_OPTS -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
# and if collection1 needs to be bootstrapped
|
||||
if [ -e "$SOLR_HOME/collection1/core.properties" ]; then
|
||||
CLOUD_MODE_OPTS="$CLOUD_MODE_OPTS -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -832,14 +832,22 @@ else
|
|||
SOLR_SERVER_DIR=$SOLR_TIP/node1
|
||||
SOLR_HOME=$SOLR_TIP/node1/solr
|
||||
SOLR_PORT=${CLOUD_PORTS[0]}
|
||||
if [ "$ZK_HOST" != "" ]; then
|
||||
DASHZ="-z $ZK_HOST"
|
||||
fi
|
||||
|
||||
echo -e "\nStarting up SolrCloud node1 on port ${CLOUD_PORTS[0]} using command:\n"
|
||||
echo -e "solr start -cloud -d node1 -p $SOLR_PORT \n\n"
|
||||
echo -e "solr start -cloud -d node1 -p $SOLR_PORT $DASHZ\n\n"
|
||||
|
||||
# can't launch this node in the foreground else we can't run anymore commands
|
||||
launch_solr "false" "$ADDITIONAL_CMD_OPTS"
|
||||
|
||||
zk_port=$[$SOLR_PORT+1000]
|
||||
zk_host=localhost:$zk_port
|
||||
launch_solr "false" ""
|
||||
|
||||
# if user did not define a specific -z parameter, assume embedded in first cloud node we launched above
|
||||
zk_host=$ZK_HOST
|
||||
if [ "$zk_host" == "" ]; then
|
||||
zk_port=$[$SOLR_PORT+1000]
|
||||
zk_host=localhost:$zk_port
|
||||
fi
|
||||
|
||||
for (( s=1; s<$CLOUD_NUM_NODES; s++ ))
|
||||
do
|
||||
|
|
|
@ -418,8 +418,8 @@ IF "%SOLR_MODE%"=="solrcloud" (
|
|||
) ELSE (
|
||||
IF "%verbose%"=="1" echo Configuring SolrCloud to launch an embedded ZooKeeper using -DzkRun
|
||||
set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -DzkRun"
|
||||
IF EXIST "%SOLR_HOME%\collection1\core.properties" set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1"
|
||||
)
|
||||
IF EXIST "%SOLR_HOME%\collection1\core.properties" set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1"
|
||||
) ELSE (
|
||||
set CLOUD_MODE_OPTS=
|
||||
)
|
||||
|
@ -541,15 +541,26 @@ for /l %%x in (1, 1, !CLOUD_NUM_NODES!) do (
|
|||
@echo Cloning %DEFAULT_SERVER_DIR% into %SOLR_TIP%\node%%x
|
||||
xcopy /Q /E /I "%DEFAULT_SERVER_DIR%" "%SOLR_TIP%\node%%x"
|
||||
)
|
||||
|
||||
|
||||
IF %%x EQU 1 (
|
||||
set EXAMPLE=
|
||||
START "" "%SDIR%\solr" -f -c -p !NODE_PORT! -d node1
|
||||
IF NOT "!ZK_HOST!"=="" (
|
||||
set "DASHZ=-z !ZK_HOST!"
|
||||
) ELSE (
|
||||
set "DASHZ="
|
||||
)
|
||||
@echo Starting node1 on port !NODE_PORT! using command:
|
||||
@echo solr -cloud -p !NODE_PORT! -d node1 !DASHZ!
|
||||
START "" "%SDIR%\solr" -f -cloud -p !NODE_PORT! -d node1 !DASHZ!
|
||||
set NODE1_PORT=!NODE_PORT!
|
||||
) ELSE (
|
||||
set /A ZK_PORT=!NODE1_PORT!+1000
|
||||
set "ZK_HOST=localhost:!ZK_PORT!"
|
||||
START "" "%SDIR%\solr" -f -c -p !NODE_PORT! -d node%%x -z !ZK_HOST!
|
||||
IF "!ZK_HOST!"=="" (
|
||||
set /A ZK_PORT=!NODE1_PORT!+1000
|
||||
set "ZK_HOST=localhost:!ZK_PORT!"
|
||||
)
|
||||
@echo Starting node%%x on port !NODE_PORT! using command:
|
||||
@echo solr -cloud -p !NODE_PORT! -d node%%x -z !ZK_HOST!
|
||||
START "" "%SDIR%\solr" -f -cloud -p !NODE_PORT! -d node%%x -z !ZK_HOST!
|
||||
)
|
||||
|
||||
timeout /T 10
|
||||
|
|
Loading…
Reference in New Issue