Readonlyrest settings aren't updating

hi, after saving the settings in the readonlyrest kibana plugin, and making sure the document in the elasticsearch index is in-fact updated to the new settings, the changes only appear to be applied to the node in which the kibana updated the index. When attempting to query any of the other nodes in the cluster we receive the results that were available prior to the changes.

for example:
user A had access to indices: test_A_*
change settings in kibana of Node 2 so user A has access to indices test_B_*
user A still sees indices test_A_* when querying Node 1, Node 3, etc.
user A sees indices test_B_* when querying Node2

This is using ReadOnlyRest 1.18.8 on Elasticsearch 6.8.4
Please help solve this issue

edit:
upon entering Node 1’s Kibana and pressing “Save” (without changin anything in the file) in the readonlyrest settings Node1 will reflect the changes and only display indices test_B_*

please, setup debug logs and look for logs like this:
“[CLUSTERWIDE SETTINGS] Loading ReadonlyREST config from index …”

If you don’t see it, maybe in-index settings checking is disabled. But then, at the ROR startup you should see log like this:
“[CLUSTERWIDE SETTINGS] Scheduling in-index settings check disabled”

Tried setting the logs to debug - there were indeed periodic [CLUSTERWIDE SETTINGS] with scheduling enabled - after I made a change to the configuration it has loaded that change too - after which no more [CLUSTERWIDE SETTINGS] lines have appeared. I think the problem may be that the in-index settings doesn’t schedule further checks once changes have occurred and been fetched from the index.

I finally succeed with reproducing the issue. I’ll send you tomorrow prebuild with fix to test.

1 Like

here is a prebuild for you:

https://readonlyrest-data.s3-eu-west-1.amazonaws.com/build/1.18.9-pre13/readonlyrest-1.18.9-pre13_es6.8.4.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA5SJIWBO54AGBERLX/20191121/eu-west-1/s3/aws4_request&X-Amz-Date=20191121T074125Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=9fa9c5d2e96892abfc3048d3f913ac917bf22fac030982109d18d3a7756ee2f7

1 Like