Skip to content

Commit

Permalink
Still generate docker.service unit, even if unused
Browse files Browse the repository at this point in the history
The dynamically generated docker.service file should still be there,
otherwise the statically provided docker.socket file gets confused.
  • Loading branch information
afbjorklund committed Jan 20, 2019
1 parent 67697fa commit 6f90968
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions pkg/provision/buildroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,6 @@ func configureAuth(p *BuildrootProvisioner) error {
return errors.Wrap(err, "getting cluster config")
}

if config.MachineConfig.ContainerRuntime != "" {
return nil
}

dockerCfg, err := p.GenerateDockerOptions(engine.DefaultPort)
if err != nil {
return errors.Wrap(err, "generating docker options")
Expand All @@ -309,12 +305,15 @@ func configureAuth(p *BuildrootProvisioner) error {
return err
}

if err := p.Service("docker", serviceaction.Enable); err != nil {
return err
}
if config.MachineConfig.ContainerRuntime == "" {

if err := p.Service("docker", serviceaction.Restart); err != nil {
return err
if err := p.Service("docker", serviceaction.Enable); err != nil {
return err
}

if err := p.Service("docker", serviceaction.Restart); err != nil {
return err
}
}

return nil
Expand Down

0 comments on commit 6f90968

Please sign in to comment.