-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fix handling of os signals in tink server #528
Conversation
Hey @krishnanarchana! Welcome and thank you for this contribution! Looks like you'll need the DCO sign-off before we can merge this. There are a couple of guides here or here to help with that if needed. |
Hi @jacobweinstock thank you for your review, will do the DCO signoff. |
Previously tink server failed to respect os signals like SIGTERM,SIGINT etc. This PR fixes the tink server so that os signals sent to the tink server process will actually kill the process. Confirmed by runnning in docker-cpompose env: ```bash make images make run docker exec -it tink_tinkerbell_1 sh ps kill -SIGINT 1 ``` Corresponding logs: ``` tinkerbell_1 | {"level":"info","ts":1630442128.6128566,"caller":"tink-server/main.go:198","msg":"signal received, stopping servers","service":"github.com/tinkerbell/tink","signal":"interrupt"} tinkerbell_1 | {"level":"info","ts":1630442129.4250214,"caller":"metrics/metrics.go:58","msg":"initializing label values","service":"github.com/tinkerbell/tink"} tinkerbell_1 | {"level":"info","ts":1630442129.4286315,"caller":"http-server/http_server.go:88","msg":"serving http","service":"github.com/tinkerbell/tink"} ``` Now the docker container exists and we can see the log that signal is received. Signed-off-by: Archana krishnan <[email protected]>
9f473f1
to
81ac85c
Compare
@jacobweinstock completed the DCO signoff. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #528 +/- ##
=======================================
Coverage 33.61% 33.61%
=======================================
Files 44 44
Lines 3385 3385
=======================================
Hits 1138 1138
Misses 2150 2150
Partials 97 97 Continue to review full report at Codecov.
|
Related to #527
Description
Previously tink server failed to respect os signals like SIGTERM,SIGINT etc.
This PR fixes the tink server so that os signals sent to the tink server process
will actually kill the process.
Why is this needed
Sending os signals actually terminates the tink server.
Fixes: #527
How Has This Been Tested?
Corresponding logs:
Now the docker container exists and we can see the log that signal is received.
Signed-off-by: Archana krishnan [email protected]