Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-17701: Strip out AUTH_PORT in favour of SOLR_PORT (#3265)

Eric Pugh85d96e113ca3
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 148e967c45d..c9973dfbbe2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -39,6 +39,8 @@ Improvements
* SOLR-17685: Simplify bin/solr scripts by no longer SOLR_TOOL_HOST variable in favour of existing SOLR_HOST ENV variable. (Eric Pugh, Houston Putnam)
+* SOLR-17701: Simplify bin/solr scripts by removing AUTH_PORT export in favour of more commonly used SOLR_PORT export. (Eric Pugh)
+
Optimizations
---------------------
* SOLR-17568: The CLI bin/solr export tool now contacts the appropriate nodes directly for data instead of proxying through one.
diff --git a/solr/bin/solr b/solr/bin/solr
index 2d53e0bc8ce..e085b6100dd 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -597,10 +597,6 @@ if [[ "$SCRIPT_CMD" == "auth" ]]; then
exit 1
fi
- if [ -n "${AUTH_PORT}" ]; then
- export SOLR_PORT="${AUTH_PORT}"
- fi
-
if [ -z "${SOLR_HOME:-}" ]; then
SOLR_HOME="$SOLR_SERVER_DIR/solr"
elif [[ $SOLR_HOME != /* ]]; then
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 43928a5a6ae..bb2b3917a0e 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1214,10 +1214,6 @@ IF NOT EXIST "%SOLR_HOME%\" (
)
)
-IF DEFINED AUTH_PORT (
- set "SOLR_PORT=%AUTH_PORT%"
-)
-
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% %SOLR_TOOL_OPTS% -Dsolr.install.dir="%SOLR_TIP%" ^
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
diff --git a/solr/packaging/test/test_auth.bats b/solr/packaging/test/test_auth.bats
index 58a0ad16ee5..b476541b392 100644
--- a/solr/packaging/test/test_auth.bats
+++ b/solr/packaging/test/test_auth.bats
@@ -61,24 +61,3 @@ setup() {
assert_output --partial '"status":0'
solr stop --all
}
-
-@test "AUTH_PORT delegates to SOLR_PORT" {
- solr start -p ${SOLR2_PORT}
-
- export AUTH_PORT=${SOLR2_PORT}
-
- unset SOLR2_PORT
- assert [ -z "${SOLR2_PORT}" ]
-
- solr auth enable --type basicAuth --credentials name:password
- solr assert --started http://localhost:${AUTH_PORT} --timeout 5000
-
- run curl -u name:password --basic "http://localhost:${AUTH_PORT}/api/cluster"
- assert_output --partial '"status":0'
-
- solr auth disable
- run curl "http://localhost:${AUTH_PORT}/api/cluster"
- assert_output --partial '"status":0'
- solr stop --all
- export SOLR2_PORT=${AUTH_PORT}
-}