Skip to content
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

[BUG] NodeInfoRequest fails when connecting to Amazon OpenSearch Service #1129

Closed
dancristiancecoi opened this issue Aug 6, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@dancristiancecoi
Copy link
Contributor

dancristiancecoi commented Aug 6, 2024

What is the bug?

When sending a NodeInfoRequest to Amazon OpenSearch Service the request fails with the following error:

Missing required property 'NodeInfo.host'

This issue appears to be caused by Amazon OpenSearch Service obfuscating/removing some fields from the REST API responses that the client code expects to be not null.

Beside NodeInfo.host the following fields are also missing from the response and are causing a similar error:

  • NodeInfo.IP
  • NodeInfo.TransportAddress

How can one reproduce the bug?

  1. Connect the client to Amazon OpenSearch Service with basic auth and only fine-grained access control enabled (IAM is disabled).
  2. Send a NodeInfoRequest:
   NodesInfoRequest nodesInfoRequest = new NodesInfoRequest.Builder().metric(List.of("plugins")).build();
   NodesInfoResponse nodesInfoResponse = openSearchNodesClient.info(nodesInfoRequest);

Do you have any additional context?

I can raise a PR with a fix which consists in removing requireNonNull from these specific fields.

@dancristiancecoi dancristiancecoi added bug Something isn't working untriaged labels Aug 6, 2024
@dblock
Copy link
Member

dblock commented Aug 6, 2024

Thanks for opening this @dancristiancecoi. Removing the null constraint is likely the right move. As we are working on generating much of this code from spec in #366, please also check https://github.com/opensearch-project/opensearch-api-specification for correctness?

@Xtansia Xtansia removed the untriaged label Aug 7, 2024
@dancristiancecoi
Copy link
Contributor Author

@dblock I think we can remove these two fields from the required list if my findings are actually correct and its not due to a misconfiguration on my part. Cheers!

@dblock
Copy link
Member

dblock commented Aug 7, 2024

@dblock I think we can remove these two fields from the required list if my findings are actually correct and its not due to a misconfiguration on my part. Cheers!

Is the only way to reproduce this behavior to run against AWS serverless? Either way care to contribute the fix into the spec, please?

@dancristiancecoi
Copy link
Contributor Author

@dblock I think we can remove these two fields from the required list if my findings are actually correct and its not due to a misconfiguration on my part. Cheers!

Is the only way to reproduce this behavior to run against AWS serverless? Either way care to contribute the fix into the spec, please?

I have only seen this issue with Amazon OpenSearch Service. Have not tested Serverless but I suspect it will have a similar behavior.

And sure, I will raise an issue & PR.

@dancristiancecoi
Copy link
Contributor Author

PR merged.

@Xtansia
Copy link
Collaborator

Xtansia commented Aug 27, 2024

v2.14.0 has been released and includes the fix for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants