we don't disable other container engines when vmdriver==none
parent
62c0d53b7d
commit
ba20534107
|
@ -684,7 +684,8 @@ func configureRuntimes(runner cruntime.CommandRunner) cruntime.Manager {
|
|||
exit.WithError(fmt.Sprintf("Failed runtime for %+v", config), err)
|
||||
}
|
||||
|
||||
err = cr.Enable()
|
||||
disableOtherContainerEngines := viper.GetString(vmDriver) != constants.DriverNone
|
||||
err = cr.Enable(disableOtherContainerEngines)
|
||||
if err != nil {
|
||||
exit.WithError("Failed to enable container runtime", err)
|
||||
}
|
||||
|
|
|
@ -79,9 +79,11 @@ func (r *Containerd) Available() error {
|
|||
}
|
||||
|
||||
// Enable idempotently enables containerd on a host
|
||||
func (r *Containerd) Enable() error {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
func (r *Containerd) Enable(disableOtherContainerEngines bool) error {
|
||||
if disableOtherContainerEngines {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
}
|
||||
}
|
||||
if err := populateCRIConfig(r.Runner, r.SocketPath()); err != nil {
|
||||
return err
|
||||
|
|
|
@ -78,9 +78,11 @@ func (r *CRIO) Active() bool {
|
|||
}
|
||||
|
||||
// Enable idempotently enables CRIO on a host
|
||||
func (r *CRIO) Enable() error {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
func (r *CRIO) Enable(disableOtherContainerEngines bool) error {
|
||||
if disableOtherContainerEngines {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
}
|
||||
}
|
||||
if err := populateCRIConfig(r.Runner, r.SocketPath()); err != nil {
|
||||
return err
|
||||
|
|
|
@ -38,7 +38,7 @@ type Manager interface {
|
|||
// Version retrieves the current version of this runtime
|
||||
Version() (string, error)
|
||||
// Enable idempotently enables this runtime on a host
|
||||
Enable() error
|
||||
Enable(bool) error
|
||||
// Disable idempotently disables this runtime on a host
|
||||
Disable() error
|
||||
// Active returns whether or not a runtime is active on a host
|
||||
|
|
|
@ -75,9 +75,11 @@ func (r *Docker) Active() bool {
|
|||
}
|
||||
|
||||
// Enable idempotently enables Docker on a host
|
||||
func (r *Docker) Enable() error {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
func (r *Docker) Enable(disableOtherContainerEngines bool) error {
|
||||
if disableOtherContainerEngines {
|
||||
if err := disableOthers(r, r.Runner); err != nil {
|
||||
glog.Warningf("disableOthers: %v", err)
|
||||
}
|
||||
}
|
||||
return r.Runner.Run("sudo systemctl start docker")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue