-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support SIGHUP configuration reloading #6000
Conversation
Signed-off-by: Sean Porter <portertech@gmail.com>
Signed-off-by: Sean Porter <portertech@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to wait for the issue to propose a solution.
Signed-off-by: Sean Porter <portertech@gmail.com>
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
switch s { | ||
case syscall.SIGHUP: | ||
if err := col.reloadConfiguration(ctx); err != nil { | ||
return err | ||
} | ||
default: | ||
break LOOP | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a simple if
correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was considering future support for other signals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So please use if for the moment :)
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@swiatekm-sumo any way you can talk to the author, or pickup this? |
@portertech is on vacation until Monday. I can pick it up in the meantime if we're in a big hurry though. |
Signed-off-by: Sean Porter <portertech@gmail.com>
@bogdandrutu any other changes required? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the small nit left.
Codecov ReportBase: 92.04% // Head: 92.00% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6000 +/- ##
==========================================
- Coverage 92.04% 92.00% -0.04%
==========================================
Files 219 219
Lines 13245 13259 +14
==========================================
+ Hits 12191 12199 +8
- Misses 830 834 +4
- Partials 224 226 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description:
Added SIGHUP UNIX signal handling to reload configuration (internal collector restart). I reused the configuration source notification reloading logic, a very small change.
Link to tracking Issue:
This is a possible solution/implementation for #5966
Testing:
Added a basic SIGHUP signal test to ensure the collector finds itself in a running state.
Manual testing demonstrates that the SIGHUP signal successfully triggers the existing configuration reloading logic.
$ ./bin/otelcorecol_* --config ./examples/local/otel-config.yaml
From: https://gist.github.com/portertech/63a33aca67bc0468120abc924eda49e3
Documentation:
Will need to update documentation to cover the newly supported UNIX signal (SIGHUP). This functionality is very common.