opensearch-project / helm-charts

:wheel_of_dharma: A community repository for Helm Charts of OpenSearch Project.
https://opensearch.org/docs/latest/opensearch/install/helm/
Apache License 2.0
170 stars 228 forks source link

[BUG][Opensearch] Special characters in password silently fails the graceful termination handler #563

Closed Phenix66 closed 2 months ago

Phenix66 commented 2 months ago

Describe the bug The auth handling for the opensearch-master-graceful-termination-handler container is not done in a Bash safe manner. Certain characters, such as !, may get interpreted by Bash and cause the entire curl command to silently fail.

To Reproduce Steps to reproduce the behavior:

  1. Deploy the Opensearch chart with the following non-default values (password value can be anything with ! in it and other characters may break it as well)
    masterTerminationFix: true
    extraEnvs:
    - name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
    value: ABC123!!def67789
  2. Check the logs of the opensearch-master-graceful-termination-handler container
  3. Note that they are completely empty. If the curl was successful, there should be log messages as to whether or not that node is the master.

Expected behavior Log messages for the opensearch-master-graceful-termination-handler containers are present

Chart Name Opensearch

Screenshots N/A

Host/Environment

Phenix66 commented 2 months ago

Nevermind, I overlooked how this executed and was expecting logs when there shouldn't have been. After further testing, no issues.