Skip to content
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

Wait to add aliases to /etc/hosts before starting kubelet #8035

Merged
merged 19 commits into from
May 8, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/drivers/kic/kic.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ func (d *Driver) Restart() error {
if err = d.Start(); err != nil {
return fmt.Errorf("start during restart %v", err)
}
// we need to restart kubelet to ensure that it picks up the correct node ip
// there seems to be a race condition between when the ip is updated
// on node restarts and kubelet starting up
glog.Infof("Restarting kubelet...")
cr := command.NewExecRunner() // using exec runner for interacting with docker/podman daemon
if _, err := cr.RunCmd(exec.Command("sudo", "systemctl", "restart", "kubelet")); err != nil {
priyawadhwa marked this conversation as resolved.
Show resolved Hide resolved
return errors.Wrap(err, "restarting kubelet")
}
return nil

}
Expand Down