From e9060d3df24b30cdbfac62d749fec3367dade572 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 19 Jun 2024 11:40:15 -0400 Subject: [PATCH] Fix windows issue where two nodes on different ports were joining the same cluster (#7) * windows \n Signed-off-by: Derek Ho * Change to be the same and cat yml Signed-off-by: Derek Ho * Remove extra debug step Signed-off-by: Derek Ho --------- Signed-off-by: Derek Ho --- action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index cafe8b3..ac3a649 100644 --- a/action.yml +++ b/action.yml @@ -138,10 +138,10 @@ runs: opensearch_minor_version=$(echo "$opensearch_version" | cut -d'.' -f2) if [ "$opensearch_major_version" -lt 2 ] || ([ "$opensearch_major_version" -eq 2 ] && [ "$opensearch_minor_version" -lt 12 ]); then echo "Running the command without -t option (OpenSearch version is $opensearch_version)" - /bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -y -i -s" + /bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat" else echo "Running the command with -t option (OpenSearch version is $opensearch_version)" - /bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -t -y -i -s" + /bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -t" fi echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml shell: bash @@ -155,7 +155,8 @@ runs: - name: Replace opensearch.yml file if applicable if: ${{ inputs.port != '' }} run: | - echo -e "\nhttp.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml + echo '' >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml + echo "http.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml shell: bash # Run OpenSearch