node/ir: Handle double SIGHUP correctly #1197
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1197
Loading…
Reference in a new issue
No description provided.
Delete branch "elebedeva/frostfs-node:fix/double-sighup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #1145
Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com
331434e0ea
to92ee14bd89
@ -76,3 +60,1 @@
shutdown()
log.Info(logs.FrostFSNodeTerminationSignalProcessingIsComplete)
return
case <-ch:
In your implementation, we now have a race condition between
ch
andsighupCh
.However, if we received SIGTERM there is no need to SIGHUP, because we will eventually shutdown.
I suggest make SIGTERM/SIGINT having priority over SIGHUP.
Also, there are is no guarantee that we receive all signals, even if we have buffered channel.
It was the problem of the old implementation. Now we have 2 separate channels and SIGTERM / SIGINT are handled similarly, so we should not lose anything useful.
fixed
92ee14bd89
toa0e5fc733e