From c116fffa02b7352a664f53ab545d69bf5d6ee8dc Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 6 Oct 2023 15:11:07 -0400 Subject: [PATCH 1/3] Replaces confusing log with a better error message Signed-off-by: Darshit Chanpura --- tools/install_demo_configuration.bat | 7 +++++-- tools/install_demo_configuration.sh | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/install_demo_configuration.bat b/tools/install_demo_configuration.bat index d9d30fea2b..c869788a54 100755 --- a/tools/install_demo_configuration.bat +++ b/tools/install_demo_configuration.bat @@ -339,8 +339,11 @@ if "%initialAdminPassword%" NEQ "" ( ) if not defined ADMIN_PASSWORD ( - echo Unable to find the admin password for the cluster. Please set initialAdminPassword or create a file %ADMIN_PASSWORD_FILE% with a single line that contains the password. - exit /b 1 +REM Commenting this out in favor of: https://github.com/opensearch-project/security/issues/3489 +REM echo Unable to find the admin password for the cluster. Please set initialAdminPassword or create a file %ADMIN_PASSWORD_FILE% with a single line that contains the password. +REM exit /b 1 + set "ADMIN_PASSWORD=admin" + echo "Unable to find custom admin password. Continuing with the default password for admin." ) echo " ***************************************************" diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index 01bc1bfed1..073716708a 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -397,8 +397,11 @@ if [[ -n "$initialAdminPassword" ]]; then elif [[ -f "$ADMIN_PASSWORD_FILE" && -s "$ADMIN_PASSWORD_FILE" ]]; then ADMIN_PASSWORD=$(head -n 1 "$ADMIN_PASSWORD_FILE") else - echo "Unable to find the admin password for the cluster. Please run 'export initialAdminPassword=' or create a file $ADMIN_PASSWORD_FILE with a single line that contains the password." - exit 1 +# Commenting in favor of: https://github.com/opensearch-project/security/issues/3489 +# echo "Unable to find the admin password for the cluster. Please run 'export initialAdminPassword=' or create a file $ADMIN_PASSWORD_FILE with a single line that contains the password." +# exit 1 + ADMIN_PASSWORD="admin" + echo "Unable to find custom admin password. Continuing with the default password for admin." fi echo " ***************************************************" From 86f8f1645d064d9d38ed55d036a017ce1724dae1 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 6 Oct 2023 16:11:27 -0400 Subject: [PATCH 2/3] Updates echo messages to be more detailed Signed-off-by: Darshit Chanpura --- tools/install_demo_configuration.bat | 3 +++ tools/install_demo_configuration.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/install_demo_configuration.bat b/tools/install_demo_configuration.bat index c869788a54..addacef208 100755 --- a/tools/install_demo_configuration.bat +++ b/tools/install_demo_configuration.bat @@ -344,6 +344,9 @@ REM echo Unable to find the admin password for the cluster. Please set initialA REM exit /b 1 set "ADMIN_PASSWORD=admin" echo "Unable to find custom admin password. Continuing with the default password for admin." + echo "You can set the custom admin password in one of the following two ways:" + echo "1. Run 'export initialAdminPassword=' before script execution." + echo "2. Create a file $ADMIN_PASSWORD_FILE with a single line that contains the password. ) echo " ***************************************************" diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index 073716708a..2c658f976e 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -402,6 +402,9 @@ else # exit 1 ADMIN_PASSWORD="admin" echo "Unable to find custom admin password. Continuing with the default password for admin." + echo "You can set the custom admin password in one of the following two ways:" + echo "1. Run 'export initialAdminPassword=' before script execution." + echo "2. Create a file $ADMIN_PASSWORD_FILE with a single line that contains the password." fi echo " ***************************************************" From 10bb68f52725623dd8bc172eb735c8b1ed33c3f9 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 6 Oct 2023 17:14:39 -0400 Subject: [PATCH 3/3] Fixes missing double quotes Signed-off-by: Darshit Chanpura --- tools/install_demo_configuration.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install_demo_configuration.bat b/tools/install_demo_configuration.bat index addacef208..589a86540c 100755 --- a/tools/install_demo_configuration.bat +++ b/tools/install_demo_configuration.bat @@ -346,7 +346,7 @@ REM exit /b 1 echo "Unable to find custom admin password. Continuing with the default password for admin." echo "You can set the custom admin password in one of the following two ways:" echo "1. Run 'export initialAdminPassword=' before script execution." - echo "2. Create a file $ADMIN_PASSWORD_FILE with a single line that contains the password. + echo "2. Create a file $ADMIN_PASSWORD_FILE with a single line that contains the password." ) echo " ***************************************************"