mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Run 'etcd2' if it exists, in preference to 'etcd'
This is to accommodate CoreOS, where 'etcd' is a very old version
This commit is contained in:
parent
dbc59aad7c
commit
1307799a66
@ -181,7 +181,12 @@ func (es *e2eService) startEtcd() (*killCmd, error) {
|
||||
return nil, err
|
||||
}
|
||||
es.etcdDataDir = dataDir
|
||||
etcdPath, err := exec.LookPath("etcd")
|
||||
var etcdPath string
|
||||
// CoreOS ships a binary named 'etcd' which is really old, so prefer 'etcd2' if it exists
|
||||
etcdPath, err = exec.LookPath("etcd2")
|
||||
if err != nil {
|
||||
etcdPath, err = exec.LookPath("etcd")
|
||||
}
|
||||
if err != nil {
|
||||
glog.Infof("etcd not found in PATH. Defaulting to %s...", defaultEtcdPath)
|
||||
_, err = os.Stat(defaultEtcdPath)
|
||||
|
Loading…
Reference in New Issue
Block a user