This ticket will address several issues with the Elasticsearch 7 config upgrade process. All steps below assume Elasticsearch 7 was deployed into a clean bundle.
Issue 1 - Fields within the ElasticsearchConnectionConfiguration-default.config are not updated if there is no ElasticsearchConfiguration.config file present in bundle
- Delete any ElasticsearchConfiguration.config from osgi/config if present
- Take note of the fields within ElasticsearchConnectionConfiguration-default.config (e.g. active=true)
- Start Portal
Expected result: The "active" field within ElasticsearchConnectionConfiguration-default.config should be changed from true to false since Portal is starting in embedded mode. No remote connection appears in Search Admin.
Actual result: The content within ElasticsearchConnectionConfiguration-default.config are unchanged. Within Search Admin a "Error java.net.ConnectException: Connection refused" appears.
Issue 2 - When ElasticsearchConfiguration.config is present in the bundle and using embedded mode, the absence of the ElasticsearchConnectionConfiguration-default.config file causes startup errors
- Create / Modify the ElasticsearchConfiguration.config within osgi/config and delete operationMode="REMOTE" if present (use embedded mode).
- Delete ElasticsearchConnectionConfiguration-default.config if present
- Start Portal
Expected result: No startup errors and embedded Elasticsearch functions normally.
Actual result: The following error appears in the console:
Note: If ElasticsearchConfiguration.config is not present in the bundle, no startup errors occur.
Issue 3 - When ElasticsearchConfiguration.config is using a connection ID other than "remote", the "active" field within ElasticsearchConnectionConfiguration-default.config is not changed to false on startup . This may lead to an unused connection process running.
- Download and set up an Elasticsearch 7 remote server
- Within ElasticsearchConfiguration.config set the following properties:
- Copy the ElasticsearchConnectionConfiguration-default.config file and in the name replace the -default with -remote. Then within the file, change the connectionId from "remote" to "test"
- Leave the ElasticsearchConnectionConfiguration-default.config within the bundle keep the default values.
- Start Portal
Expected result: The active field within ElasticsearchConnectionConfiguration-default.config is changed from true to false.
Actual result: The fields within ElasticsearchConnectionConfiguration-default.config remain unchanged. In Search Admin, both the "test" and "remote" connections are both active. The "remote" connection seemingly points to the same node as the "test" connection.
Note: With the fix for this issue above, users will no longer be able to use the ElasticsearchConnectionConfiguration-default.config to set up a custom connection with a connection ID other than "remote".
Portal master git commit: e07e3a8b4857d0680ee5dcef2f05cd8d96a9c780