This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 7351f84ea85 Remove invalid usage of "scheme" option in bin/solr config 
(#2722)
7351f84ea85 is described below

commit 7351f84ea85e446bb99557e00df13af862fbaaae
Author: Christos Malliaridis <[email protected]>
AuthorDate: Tue Sep 24 15:13:58 2024 +0200

    Remove invalid usage of "scheme" option in bin/solr config (#2722)
    
    IMPORTANT: Users have to provide the Solr URL scheme via the Solr URL 
parameter or configure it via the environment variable solr.url.scheme in case 
where they use the default Solr URL.
    
    Note: This breaking change was introduced accidentally in 9.7. This commit 
fixes the errors thrown by the breaking change without introducing backwards 
compatibility with 9.6. This is due to the overlapping option flags (-s) and 
the already applied changes in the CLI files.
---
 solr/bin/solr                                                 | 11 -----------
 solr/bin/solr.cmd                                             | 10 ----------
 .../deployment-guide/pages/solr-control-script-reference.adoc | 10 ----------
 3 files changed, 31 deletions(-)

diff --git a/solr/bin/solr b/solr/bin/solr
index c9038325666..83fe945fd19 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -965,14 +965,6 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
               ZK_HOST="$2"
               shift 2
           ;;
-          -s|--scheme|-scheme)
-              if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
-                print_usage "$SCRIPT_CMD" "URL scheme is required when using 
the $1 option!"
-                exit 1
-              fi
-              SOLR_URL_SCHEME="$2"
-              shift 2
-          ;;
           *)  # Pass through all other params
               if [ "$1" != "" ]; then
                 CONFIG_PARAMS+=($1)
@@ -987,9 +979,6 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
   if [[ -n "$ZK_HOST" ]]; then
     CONFIG_PARAMS+=("-z" "$ZK_HOST")
   fi
-  if [[ -n "$SOLR_URL_SCHEME" ]]; then
-    CONFIG_PARAMS+=("--scheme" "$SOLR_URL_SCHEME")
-  fi
   run_tool config "${CONFIG_PARAMS[@]}"
   exit $?
 fi
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index a9ce9005e8b..74ee3f35ae7 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1579,9 +1579,6 @@ IF "%1"=="-z" goto set_config_zk
 IF "%1"=="--zk-host" goto set_config_zk
 IF "%1"=="-zkHost" goto set_config_zk
 IF "%1"=="--zkHost" goto set_config_zk
-IF "%1"=="-s" goto set_config_url_scheme
-IF "%1"=="--scheme" goto set_config_url_scheme
-IF "%1"=="-scheme" goto set_config_url_scheme
 set "CONFIG_ARGS=!CONFIG_ARGS! %1"
 SHIFT
 goto parse_config_args
@@ -1592,15 +1589,8 @@ SHIFT
 SHIFT
 goto parse_config_args
 
-:set_config_url_scheme
-set SOLR_URL_SCHEME=%~2
-SHIFT
-SHIFT
-goto parse_config_args
-
 :run_config
 IF NOT "!ZK_HOST!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! -z !ZK_HOST!"
-IF NOT "!SOLR_URL_SCHEME!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! --scheme 
!SOLR_URL_SCHEME!"
 
 "%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% 
-Dsolr.install.dir="%SOLR_TIP%" ^
   
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml"
 ^
diff --git 
a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
 
b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
index aa3a5e7c3bf..ffa857d091f 100644
--- 
a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
+++ 
b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
@@ -1272,16 +1272,6 @@ Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or 
`solr.in.cmd`.
 +
 Base Solr URL, which can be used in SolrCloud mode to determine the ZooKeeper 
connection string if that's not known.
 
-`-s <scheme>` or `--scheme <scheme>`::
-+
-[%autowidth,frame=none]
-|===
-|Optional |Default: `http`
-|===
-+
-The scheme for accessing Solr. Accepted values: http or https.  Default is 
'http'
-
-
 == ZooKeeper Operations
 
 The `bin/solr` script allows certain operations affecting ZooKeeper.

Reply via email to