Custom healthcheck with filters#2232
Conversation
3e82f00 to
ab380d9
Compare
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
opensearch-project#2214
opensearch-project#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
ab380d9 to
6ec418b
Compare
| "maxPercentage": 1, | ||
| }, | ||
| "optimizedHealthcheckId": undefined, | ||
| "optimizedHealthcheck": undefined, |
There was a problem hiding this comment.
What happen to existing 1.2 customer who forget to update their dashboards.yml file fromopensearch.optimizedHealthcheckId to opensearch.optimizedHealthcheck.Id
There was a problem hiding this comment.
OSD will fail to start because opensearch.optimizedHealthcheckId cannot be recognized. We can call this out in the release note that customers may need to update their yml. It may be a bit over engineering if we want to keep both optimizedHealthcheckId and optimizedHealthcheck and have if/else to use optimizedHealthcheckId if it is provided optimizedHealthcheckId.
There was a problem hiding this comment.
I've added this to the deprecated service so it will work and properly map the value from optimizedHealthcheckId -> optimizedHealthcheck.id and then log a warning message to use the new configuration
There was a problem hiding this comment.
@kavilla I missed the deprecated service part initially. Looks good!
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-2232-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e6bbb405441c7d59a8d5df6a477c5e432fa88b87
# Push it to GitHub
git push --set-upstream origin backport/backport-2232-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.xThen, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-2232-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e6bbb405441c7d59a8d5df6a477c5e432fa88b87
# Push it to GitHub
git push --set-upstream origin backport/backport-2232-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.2 1.2
# Navigate to the new working tree
cd .worktrees/backport-1.2
# Create a new branch
git switch --create backport/backport-2232-to-1.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e6bbb405441c7d59a8d5df6a477c5e432fa88b87
# Push it to GitHub
git push --set-upstream origin backport/backport-2232-to-1.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.2Then, create a pull request where the |
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6bbb40)
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6bbb40)
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6abd9e)
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6bbb40)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6abd9e)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6abd9e)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6abd9e)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6abd9e)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6bbb40)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
attribute_key: "attribute_value",
}
```
Also, fixes issue that expects the response to array when it was a
dictionary.
Issue:
#2214
#2203
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e6bbb40)
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3496526)
Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3496526)
…ch-project#2277) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: opensearch-project#2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
…ch-project#2277) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: opensearch-project#2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
…2296) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3496526) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…2297) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3496526) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…2300) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
…2298) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
…2300) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34)
…2300) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34)
…2300) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34)
…2300) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34)
…2300) (#2304) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…2300) (#2302) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…2300) (#2301) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
* [BUG] fix healthcheck logic to expect object and return ids (#2277) (#2300) (#2301) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34) Co-authored-by: Kawika Avilla <kavilla414@gmail.com> * change version Signed-off-by: Tao liu <liutaoaz@amazon.com> Signed-off-by: Tao liu <liutaoaz@amazon.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…2300) (#2303) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: #2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: #2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e10ba34) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…ch-project#2277) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: opensearch-project#2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Sergey V. Osipov <sipopo@yandex.ru>
…-project#2244) Enable filtering with custom health checks based on node attributes: ``` opensearch.optimizedHealthcheck.filters: { attribute_key: "attribute_value", } ``` Also, fixes issue that expects the response to array when it was a dictionary. Issue: opensearch-project#2214 opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit e6bbb40) Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
…ch-project#2277) (opensearch-project#2298) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: opensearch-project#2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
…ch-project#2277) Original implementation incorrectly assumed the return list of nodes was an object array. This PR: opensearch-project#2232 Addressed the return but didn't catch the nodes.find in the return which is a function for an array. Also, refactors to return a list of node_ids because the original implementation indicated that it should but it can return node ids but it never did. It only returned `null` or `_local`, the problem with this approach is that it doesn't expect valid node version with different DIs or filter out nodes when we pass `null` as the node ID for the node info call because it was fan out the request to all nodes. Now this function will return `_local` if all the nodes share the same cluster_id using a greedy approach since we can assume it is all the same version. Will return node ids, if the cluster_id are different so it will pass a CSV to the node info call and return the info for those nodes. And null if no cluster_id is present, ie, fan out the response. Original issue: opensearch-project#2203 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Sergey V. Osipov <sipopo@yandex.ru>
Description
Enable filtering with custom health checks based on node attributes:
Also, fixes issue that expects the response to array when it was a
dictionary.
Signed-off-by: Kawika Avilla kavilla414@gmail.com
Issues Resolved
#2214
#2203
Check List
yarn test:jestyarn test:jest_integrationyarn test:ftr