-
Notifications
You must be signed in to change notification settings - Fork 209
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
Elasticsearch 5 Support Breaks Reconfigure on Redirects #1307
Comments
I feel like there's an http client within Chef that we could be using that will follow redirects instead of using raw |
Looks like
|
Signed-off-by: Kartik Null Cating-Subramanian <[email protected]>
Signed-off-by: Kartik Null Cating-Subramanian <[email protected]>
I knew I was missing an abstraction layer somewhere. |
👍 on using Chef::HTTP |
It looks like this has been addressed as part of PR #1309, but we should maybe put some further thought into what the correct HTTP library is. Perhaps even going so far as checking what the client team recommends. After reading the code a bit this morning, Chef::HTTP appears to be closely related to making actual Chef API requests. I was attempting to look into the retry logic (it has some built in, so at the very least 1309 is duplicating that logic to some extent. My suggestions:
|
|
I have added these tests for the retryable portion of the code. |
Preliminary Elasticsearch 5 support added in #1287 breaks reconfigure in OWCA-configured systems. This was discovered when testing the latest packages of Chef and Automate in OWCA. OWCA is configured to the use the Automate-provided Elasticsearch as external search for Chef Server.
It's currently configured as such:
In this case,
http://localhost:8080/elasticsearch
redirects tohttp://localhost:8080/elasticsearch/
, causing the reconfigure to fail when parsing JSON because it's actually parsing the HTML of the redirect message.Yes, configuring the external search endpoint to go to
http://localhost:8080/elasticsearch/
will fix this problem, and I've asked that Amazon do as much, but I believe that our tooling could behave better in the face of common configurations that otherwise results in a completely functional system (e.g. search still works when configured this way, so this helper should work as well).The text was updated successfully, but these errors were encountered: