-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] OpenSearch app is not able to pick up empty node.roles=
environment variable to run as coordinating node.
#3412
Comments
node.roles=
environment values to run as coordinating node,node.roles=
environment variable to run as coordinating node,
node.roles=
environment variable to run as coordinating node,node.roles=
environment variable to run as coordinating node.
Workaround using docker helm
would be good to just pass |
@prudhvigodithi I believe this is the expected behavior: |
hey @reta, I have tried as well and added to the above
I believe OpenSearch environment variable parsing logic needs to be fixed to look for empty string ? |
I don't think so, it is difficult to distinguish between variable not set (== empty string) and variable not passed at all - in both cases there is no value. May be supporting |
@reta ideally since this works
|
Isn't the current behavior that "absence of node.roles = coordinator node"? IMO |
@dblock nope (surprisingly), here is how it works [1], citing Elasticsearch documentation here:
But:
[1] https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html |
Hey @reta yes empty |
Since Opensearch configuration is YAML, the configuration via environment variables should support whatever YAML supports. For environment variables the obvious solution to this is to use JSON encoding since it is almost YAML equivalent while also being whitespace-insensitive which lends itself well to single-line environment variables. The problem is that for One solution to this would be to simply switch to using JSON which is well defined and widely supported. However this would be a breaking change. Maybe for backwards compatibility this environment variable should allow the current ad-hoc configuration language but also fall back to JSON? That would make these options all valid:
|
I think @prudhvigodithi's suggestion of supporting |
this is also a big issue for me. Do we have any plans to resolve this? |
@mooneym17 I don't think anyone is working on this, please contribute! |
i am new to opensearch, but after looking over the code (untrained eye). I believe setting node.roles=- will set a coordinator node (opensearch-node2). curl -k -uadmin:admin http://127.0.0.1:9202/_cat/nodes?v |
thanks. doesnt passing node.roles=- allow for a coordinator as above? |
Describe the bug
Coming from the issue opensearch-project/opensearch-build#2129, OpenSearch app is not able to pick up empty
node.roles=
environment values, to allow to run as coordinating node. This works fine when added toopensearch.yml
asnode.roles: []
, but not able to pick when passed as environment variable. However when passed a specific role asnode.roles=master
OpenSearch app is able to pick up and pass the role asmaster
.As per the document https://opensearch.org/docs/latest/opensearch/cluster/, passing empty list
node.roles: []
should allow the node to run with coordinating role.To Reproduce
Expected behavior
docker run -e 'node.roles='
should allow to run the node as coordinating node.Host/Environment (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: