-
Notifications
You must be signed in to change notification settings - Fork 186
Opendistro SQL settings not being read from elasticsearch.yml #538
Comments
Hi @sabflik , thanks for reporting the issue! Could you provide more details? Such as the docker image version you used and which SQL plugin setting was unavailable after started up? Thanks! |
Yes of course!
Cheers! |
Thanks @sabflik. I launched the 1.8 docker image and checked SQL setting by
|
Hi @dai-chen so I started up the container with the following elasticsearch config:
When I run your curl command (http instead of https 😁 ) I see that the properties are set correctly...
However, the behaviour of the service does not reflect these changes.
I then explicitly curled in the setting
...But still got the semantic error HOWEVER, if I first set it to true, and then false, then the behaviour is reflected correctly
|
@sabflik Thanks for the details! Will try it out and investigate on my side. |
Thank you! |
I tried to start docker image with the elasticsearch.yml given. In this case, curl ES at 9200 returns nothing. Not sure if I missed anything.
Without the custom
|
@sabflik Thanks! I missed that. It works for me now. But I'm unable to reproduce the issue. I started docker image first without custom config and check SQL settings. And then I restarted docker image with the custom config you provided. In both cases, the SQL settings were consistent with ES config. First time without custom ES config:
Second time with custom config:
|
@dai-chen the issue doesn't seem to be with the values of the settings themselves being propagated, rather, the settings are misleading. In order to reproduce the issue, try starting up the service with the custom config I provided. One of the settings I've put in there is to enable the cursor. On startup, the cluster settings will report that this setting is enabled. However, if you actually put data in an index and then do a SQL search, the cursor will not be returned in the response. It appears that although the cluster settings report that the cursor is enabled, the behaviour of the SQL endpoint does not reflect it. In order to get the cursor to actually be enabled, I've got to execute the following curl commands in the given order:
If I now do a search, the cursor is returned. |
@sabflik Sorry that I missed what you mentioned earlier. I can reproduce the issue now. It seems in this case when Elasticsearch starts, it won't send cluster setting event to our listener in plugin. So we won't read the setting value in yml until the cluster changes triggering an event. I'm still investigating and will make this a bug to fix once confirmed. Thanks! |
Awesome, thanks for that! |
When running the opendistro docker image, the
opendistro.sql.*
settings are not being propagated. Instead, I'm having to resort to creating an init container that curls the settings in once the image has started up.E.g.
curl -H 'Content-Type: application/json' -X PUT localhost:9200/_opendistro/_sql/settings -d '{"transient" : {"opendistro.sql.cursor.enabled": "true", "opendistro.sql.cursor.keep_alive": "5m"}}'
The text was updated successfully, but these errors were encountered: