opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.65k stars 855 forks source link

[BUG] - Unable to set environment variable for opensearch_dashboards.yml settings which contain underscores in their name #6677

Open nastri83 opened 4 months ago

nastri83 commented 4 months ago

Describe the bug

I'm trying to deploy OpenSearch without multitenancy. The setting for this in opensearch_dashboards.yml is: opensearch_security.multitenancy.enabled

In the Installation Documentation it says: "If you override opensearch_dashboards.yml settings using environment variables in your compose file, use all uppercase letters and replace periods with underscores (for example, for opensearch.hosts, use OPENSEARCH_HOSTS). This behavior is inconsistent with overriding opensearch.yml settings, where the conversion is just a change to the assignment operator (for example, discovery.type: single-node in opensearch.yml is defined as discovery.type=single-node in docker-compose.yml)."

However, when I tried deploying opensearch with OPENSEARCH_SECURITY_MUTITENANCY_ENABLED: false it still deployed with multitenancy enabled.

To Reproduce Steps to reproduce the behavior:

  1. Deploy opensearch using docker compose with the following additions: environment:
  2. The settings do not take once deployed

Expected behavior OpenSearch will deploy with multitenancy disabled.

OpenSearch Version 2.13

Dashboards Version 2.13

Plugins Logstash

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

kavilla commented 4 months ago

Hey @nastri83, thanks for opening. I believe it's because it's not added to the entry point file: https://github.com/opensearch-project/opensearch-build/blob/main/docker/release/config/opensearch-dashboards/opensearch-dashboards-docker-entrypoint-2.x.sh

@opensearch-project/admin please re-route this to https://github.com/opensearch-project/opensearch-build/