Skip to content

Commit

Permalink
Merge pull request #3560 from afbjorklund/service
Browse files Browse the repository at this point in the history
Still generate docker.service unit, even if unused
  • Loading branch information
tstromberg authored Jan 25, 2019
2 parents 6c05e28 + 6f90968 commit 31eb53c
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 31eb53c

Please sign in to comment.