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

Close controller before exiting #320

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Conversation

nkashiv
Copy link
Contributor

@nkashiv nkashiv commented May 22, 2023

Description

nginx-agent, when being stopped by sending SIGTERM (default way of stopping a service), closes all opened streams with RST_STREAM with error code 0x8 (CANCEL) (https://httpwg.org/specs/rfc7540.html#ErrorCodes ), which leads to extra warnings and inability to track actual response codes in nginx proxy layer.

Proposed changes

With these changes, when the agent will receive the SIGTERM signal the controller will be closed before exiting.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@netlify
Copy link

netlify bot commented May 22, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 8ce4d64
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/648355610fdf8d000846fd4c

@github-actions github-actions bot added chore Pull requests for routine tasks dependencies documentation Improvements or additions to documentation labels May 22, 2023
Makefile Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@nkashiv nkashiv requested review from dhurley and aphralG May 25, 2023 16:57
@nkashiv nkashiv force-pushed the NMS-42480 branch 2 times, most recently from cb5a1e9 to dd2b76d Compare June 6, 2023 22:18
@oliveromahony oliveromahony merged commit e3f9d3f into nginx:main Jun 12, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks dependencies documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants