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

Modify nginx_jdomain repo #4769

Merged
merged 2 commits into from
Mar 5, 2021
Merged

Conversation

kalroy
Copy link
Collaborator

@kalroy kalroy commented Feb 25, 2021

Signed-off-by: Kallol Roy karoy@progress.com

🔩 Description: What code changed, and why?

nginx_upstream_jdomain was introduced in 20201230192246 release to handle dynamic resolution of the hostnames based on the local /etc/resolv.conf.
This helps in resolving and connecting to nodes in ES cluster managed by cloud providers where change of IP address because of change of a parameter in a cluster is expected.
A very common such use case is with AWS ES.

Although the change worked for such a cluster with master nodes but it failed to resolve IP in case of clusters with no master nodes and only data nodes.

This results in Automate Compliance/Infrastructure pages returning no data or unresponsive.

This is because the nginx jdomain module added has a bug which stops it from resolving the IP address in a regular interval.
This change considers the wdaike nginx jdomain module which was originally written.

⛓️ Related Resources

4751

👍 Definition of Done

The change in the ES cluster which can trigger a blue/green deployment and assigning of new IP addresses to the data nodes should not cause Automate to stop fetching ES data from the cluster.

👟 How to Build and Test the Change

  1. Deploy Automate on EC2 instance
  2. Setup AWS ES cluster. Look up for test-cluster
  3. Make sure both of these are in the same VPC and subnet
  4. Should be able to access Automate Web page and look around compliance tab
  5. Modify the number of data nodes. This should take the ES cluster to Processing state from Active
  6. Once the ES cluster is Active, check back on Compliance tab and see if it is working fine.

✅ Checklist

📷 Screenshots, if applicable

@netlify
Copy link

netlify bot commented Feb 25, 2021

Deploy preview for chef-automate ready!

Built with commit 146eb94

https://deploy-preview-4769--chef-automate.netlify.app

@@ -1,7 +1,7 @@
daemon off;
pid {{ pkg.svc_var_path }}/pid;
worker_processes {{ cfg.ngx.main.worker_processes }};
error_log {{ cfg.ngx.main.error_log }} {{ cfg.logger.level }};
error_log {{ cfg.ngx.main.error_log }} {{ cfg.log.level }};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not related to the PR but found a bug with the config related to nginx log path

jdomain_filename="ngx_upstream_jdomain-${jdomain_version}.tar.gz"
jdomain_source="https://github.com/nicholaschiasson/ngx_upstream_jdomain/archive/${jdomain_version}.tar.gz"
jdomain_shasum=e7346dac41d473ea02995b7626bd0660115538c2c784dfe683e235c58dbc2c2c
jdomain_version="master"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any tag/version associated in the Repo to refer so going along with master.

@kalroy kalroy changed the title Modify nginx_jdomain version Modify nginx_jdomain repo Feb 25, 2021
@kalroy kalroy self-assigned this Feb 26, 2021
Signed-off-by: Kallol Roy <karoy@progress.com>
Signed-off-by: Kallol Roy <karoy@progress.com>
@kalroy kalroy force-pushed the kallol/es-gateway-nginx-jdomain-fix branch from a5f3b15 to 146eb94 Compare February 26, 2021 04:27
@kalroy kalroy merged commit e21824d into master Mar 5, 2021
@kalroy kalroy deleted the kallol/es-gateway-nginx-jdomain-fix branch March 5, 2021 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants