-
Notifications
You must be signed in to change notification settings - Fork 917
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
Implement optimized healthcheck for Dashboards #463
Conversation
Ensures that Dashboards checks only the local OpenSearch node when cluster_id node attribute is present and all nodes have some cluster_id value; Otherwise, it uses default behavior Closes opensearch-project#330 Signed-off-by: Bishoy Boktor <[email protected]>
✅ DCO Check Passed 3e04890 |
src/core/server/opensearch/version_check/ensure_opensearch_version.test.ts
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.test.ts
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Outdated
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Outdated
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Outdated
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to ask someone in AES to also check if this patch can work well for them?
I think this patch works well for AES. Just curious whether we need to simplify the logic.
Can you add some test results when "cluster_id" is set for "opensearch.optimizedHealthcheck"? |
opensearch.optimizedHealthcheck is now {string|undefined} setting that corresponds to the user's node attribute created in OpenSearch. Healthcheck will now check the node attribute path ending in the value of the setting. Signed-off-by: Bishoy Boktor <[email protected]>
✅ DCO Check Passed a7dfedb |
src/core/server/opensearch/version_check/ensure_opensearch_version.test.ts
Show resolved
Hide resolved
src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Outdated
Show resolved
Hide resolved
Simplifies getNodeId code. Also, updates healthcheck param to healthcheckAttributeName. Signed-off-by: Bishoy Boktor <[email protected]>
✅ DCO Check Passed 3278aaf |
Signed-off-by: Bishoy Boktor <[email protected]>
✅ DCO Check Passed 4644c4e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !! Thanks for the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for the incremental improvements. 👍
src/core/server/opensearch/version_check/ensure_opensearch_version.test.ts
Show resolved
Hide resolved
I don't see how this could impact backwards compatibility but we are confident on BWC passed on your comments? |
Yes :) |
Signed-off-by: Bishoy Boktor <[email protected]>
✅ DCO Check Passed 45e6ab9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Implement optimized healthcheck for Dashboards Ensures that Dashboards checks only the local OpenSearch node when cluster_id node attribute is present and all nodes have some cluster_id value; Otherwise, it uses default behavior Closes #330 Signed-off-by: Bishoy Boktor <[email protected]> * Update optimizedHealthcheck setting to be configurable opensearch.optimizedHealthcheck is now {string|undefined} setting that corresponds to the user's node attribute created in OpenSearch. Healthcheck will now check the node attribute path ending in the value of the setting. Signed-off-by: Bishoy Boktor <[email protected]> * Simplify getNodeId logic and update documentation Simplifies getNodeId code. Also, updates healthcheck param to healthcheckAttributeName. Signed-off-by: Bishoy Boktor <[email protected]> * Update opensearch_dashboards.yml with setting example Signed-off-by: Bishoy Boktor <[email protected]> * Update healthcheck setting name to optimizedHealthcheckId Signed-off-by: Bishoy Boktor <[email protected]>
* Implement optimized healthcheck for Dashboards Ensures that Dashboards checks only the local OpenSearch node when cluster_id node attribute is present and all nodes have some cluster_id value; Otherwise, it uses default behavior Closes #330 Signed-off-by: Bishoy Boktor <[email protected]> * Update optimizedHealthcheck setting to be configurable opensearch.optimizedHealthcheck is now {string|undefined} setting that corresponds to the user's node attribute created in OpenSearch. Healthcheck will now check the node attribute path ending in the value of the setting. Signed-off-by: Bishoy Boktor <[email protected]> * Simplify getNodeId logic and update documentation Simplifies getNodeId code. Also, updates healthcheck param to healthcheckAttributeName. Signed-off-by: Bishoy Boktor <[email protected]> * Update opensearch_dashboards.yml with setting example Signed-off-by: Bishoy Boktor <[email protected]> * Update healthcheck setting name to optimizedHealthcheckId Signed-off-by: Bishoy Boktor <[email protected]>
Description
Ensures that Dashboards checks only the local OpenSearch node when
cluster_id node attribute is present and all nodes have some cluster_id
value; Otherwise, it uses default behavior
Testing
Tested on both older 7.10 and newer 1.0 versions:
package.json
for 7.10 versionpackage.json
for 1.0 versionTested using local OpenSearch cluster. Configurable setting is read from
opensearch_dashboards.yml
config file and is able to move through separate code paths for the setting being enabled and disabled in the config file.The
getNodeId()
function is called in the optimized path and correctly returns a promiseValue used when
cluster_id
is set as node attr and all nodes have the same value:Signed-off-by: Bishoy Boktor [email protected]
Issues Resolved
Closes #330
Check List