fix skipping starting cri service with force systemd
parent
fffffaa47b
commit
4362818c0c
|
@ -121,7 +121,6 @@ func (r *Docker) Enable(disOthers, forceSystemd, inUserNamespace bool) error {
|
||||||
if inUserNamespace {
|
if inUserNamespace {
|
||||||
return errors.New("inUserNamespace must not be true for docker")
|
return errors.New("inUserNamespace must not be true for docker")
|
||||||
}
|
}
|
||||||
containerdWasActive := r.Init.Active("containerd")
|
|
||||||
|
|
||||||
if disOthers {
|
if disOthers {
|
||||||
if err := disableOthers(r, r.Runner); err != nil {
|
if err := disableOthers(r, r.Runner); err != nil {
|
||||||
|
@ -145,15 +144,9 @@ func (r *Docker) Enable(disOthers, forceSystemd, inUserNamespace bool) error {
|
||||||
if err := r.forceSystemd(); err != nil {
|
if err := r.forceSystemd(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return r.Init.Restart("docker")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if containerdWasActive && !dockerBoundToContainerd(r.Runner) {
|
if err := r.Init.Restart("docker"); err != nil {
|
||||||
// Make sure to use the internal containerd
|
|
||||||
return r.Init.Restart("docker")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := r.Init.Start("docker"); err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue