Skip to content

Commit e9060d3

Browse files
authored
Fix windows issue where two nodes on different ports were joining the 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]>
1 parent 2f0ad8f commit e9060d3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

action.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ runs:
138138
opensearch_minor_version=$(echo "$opensearch_version" | cut -d'.' -f2)
139139
if [ "$opensearch_major_version" -lt 2 ] || ([ "$opensearch_major_version" -eq 2 ] && [ "$opensearch_minor_version" -lt 12 ]); then
140140
echo "Running the command without -t option (OpenSearch version is $opensearch_version)"
141-
/bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -y -i -s"
141+
/bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat"
142142
else
143143
echo "Running the command with -t option (OpenSearch version is $opensearch_version)"
144-
/bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -t -y -i -s"
144+
/bin/bash -c "yes | ./opensearch-${opensearch_version}-SNAPSHOT${{ inputs.port }}/plugins/opensearch-security/tools/install_demo_configuration.bat -t"
145145
fi
146146
echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
147147
shell: bash
@@ -155,7 +155,8 @@ runs:
155155
- name: Replace opensearch.yml file if applicable
156156
if: ${{ inputs.port != '' }}
157157
run: |
158-
echo -e "\nhttp.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
158+
echo '' >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
159+
echo "http.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
159160
shell: bash
160161

161162
# Run OpenSearch

0 commit comments

Comments
 (0)