Skip to content

Commit 0dd173c

Browse files
authored
Merge pull request #899 from wangzhen127/add-comment
Add comment to health checker repair function to explain the need of kill instead of restart
2 parents 0f60f18 + aed8810 commit 0dd173c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/healthchecker/health_checker_linux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ func getUptimeFunc(service string) func() (time.Duration, error) {
5656

5757
// getRepairFunc returns the repair function based on the component.
5858
func getRepairFunc(hco *options.HealthCheckerOptions) func() {
59+
// Use `systemctl kill` instead of `systemctl restart` for the repair function.
60+
// We start to rely on the kernel message difference for the two commands to
61+
// indicate if the component restart is due to an administrative plan (restart)
62+
// or a system issue that needs repair (kill).
63+
// See https://github.com/kubernetes/node-problem-detector/issues/847.
5964
switch hco.Component {
6065
case types.DockerComponent:
6166
// Use "docker ps" for docker health check. Not using crictl for docker to remove

0 commit comments

Comments
 (0)