disable docker service when containerd

pull/11516/head
Medya Gh 2021-05-26 12:10:17 -07:00
parent 51aa548e23
commit cecef71f51
2 changed files with 4 additions and 3 deletions

View File

@ -225,9 +225,9 @@ func disableOthers(me Manager, cr CommandRunner) error {
klog.Infof("skipping containerd shutdown because we are bound to it")
continue
}
// runtime is already disabled, nothing to do.
if !r.Active() {
// in case of docker, if other runtime are already not active we are sure it is disabled, nothing to do.
// because #11515 in base image we have other runtimes disabled by default.
if me.Name() == "Docker" && !r.Active() {
continue
}

View File

@ -150,6 +150,7 @@ func (r *Docker) Restart() error {
// Disable idempotently disables Docker on a host
func (r *Docker) Disable() error {
klog.Info("disabling docker service")
// because #10373
if err := r.Init.ForceStop("docker.socket"); err != nil {
klog.ErrorS(err, "Failed to stop", "service", "docker.socket")