Skip to content

Commit

Permalink
Fix windows issue where two nodes on different ports were joining the…
Browse files Browse the repository at this point in the history
… same cluster (#7)

* windows \n

Signed-off-by: Derek Ho <[email protected]>

* Change to be the same and cat yml

Signed-off-by: Derek Ho <[email protected]>

* Remove extra debug step

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Jun 19, 2024
1 parent 2f0ad8f commit e9060d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e9060d3

Please sign in to comment.