Skip to content

Commit

Permalink
Merge pull request #3549 from afbjorklund/containerd
Browse files Browse the repository at this point in the history
Stop containerd from running, if it is not desired
  • Loading branch information
tstromberg authored Jan 23, 2019
2 parents fc62415 + 3389344 commit 308ce5a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,19 @@ func runStart(cmd *cobra.Command, args []string) {
glog.Errorf("Error stopping rkt: %v", err)
}
}
if config.VMDriver != constants.DriverNone && selectedContainerRuntime != constants.ContainerdRuntime {
if _, err = host.RunSSHCommand("sudo systemctl stop containerd"); err != nil {
glog.Errorf("Error stopping containerd: %v", err)
}
}

if config.VMDriver != constants.DriverNone && (selectedContainerRuntime == constants.CrioRuntime || selectedContainerRuntime == constants.Cri_oRuntime) {
fmt.Println("Restarting crio runtime...")
// restart crio so that it can monitor all hook dirs
if _, err := host.RunSSHCommand("sudo systemctl restart crio"); err != nil {
glog.Errorf("Error restarting crio: %v", err)
}
}

if config.VMDriver != constants.DriverNone && selectedContainerRuntime == constants.ContainerdRuntime {
fmt.Println("Restarting containerd runtime...")
Expand Down

0 comments on commit 308ce5a

Please sign in to comment.