-
Notifications
You must be signed in to change notification settings - Fork 99
CD daemon: send SIGUSR1 to IMEX daemon on node updates #638
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
Conversation
|
|
||
| // TODO: review skipping this if the new set of IP addresses only | ||
| // strictly removes addresses compared to the old set (then we don't | ||
| // need to force the daemon to re-resolve & re-connect). | ||
| if updated && !fresh { | ||
| // Actively ask the IMEX daemon to re-read its config and to | ||
| // re-connect to its peers (involving DNS name re-resolution). | ||
| klog.Infof("updated DNS/IP mapping, old process: send SIGUSR1") | ||
| if err := processManager.Signal(syscall.SIGUSR1); err != nil { | ||
| // Only log (ignore this error for now: if the process went | ||
| // away unexpectedly, the process manager will handle that. | ||
| // If any other error resulted in bad signal delivery, we | ||
| // may get away with it). | ||
| klog.Errorf("failed to send SIGUSR1 to child process: %s", err) | ||
| } | ||
| } |
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.
| // TODO: review skipping this if the new set of IP addresses only | |
| // strictly removes addresses compared to the old set (then we don't | |
| // need to force the daemon to re-resolve & re-connect). | |
| if updated && !fresh { | |
| // Actively ask the IMEX daemon to re-read its config and to | |
| // re-connect to its peers (involving DNS name re-resolution). | |
| klog.Infof("updated DNS/IP mapping, old process: send SIGUSR1") | |
| if err := processManager.Signal(syscall.SIGUSR1); err != nil { | |
| // Only log (ignore this error for now: if the process went | |
| // away unexpectedly, the process manager will handle that. | |
| // If any other error resulted in bad signal delivery, we | |
| // may get away with it). | |
| klog.Errorf("failed to send SIGUSR1 to child process: %s", err) | |
| } | |
| } | |
| // TODO: review skipping this if the new set of IP addresses only | |
| // strictly removes addresses compared to the old set (then we don't | |
| // need to force the daemon to re-resolve & re-connect). | |
| if !updated || fresh { | |
| return nil | |
| } | |
| // Actively ask the IMEX daemon to re-read its config and to | |
| // re-connect to its peers (involving DNS name re-resolution). | |
| klog.Infof("updated DNS/IP mapping, old process: send SIGUSR1") | |
| if err := processManager.Signal(syscall.SIGUSR1); err != nil { | |
| // Only log (ignore this error for now: if the process went | |
| // away unexpectedly, the process manager will handle that. | |
| // If any other error resulted in bad signal delivery, we | |
| // may get away with it). | |
| klog.Errorf("failed to send SIGUSR1 to child process: %s", err) | |
| } |
3cfc79a to
f4011ef
Compare
Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
b6dd25e to
c6b8c80
Compare
|
Updated one more time to not do I will also test this patch again and report back -- it's too easy to make mistakes during seemingly innocent changes, of course. |
|
Tested that last state, looking OK:
Kevin reviewed and verbally approved -- merging now, to facilitate branch wrestling. |
Resolves #581.