1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-02 07:43:04 +00:00

Revert back to 5 seconds for stop timeout

Add init wait time for etcd after reload
This commit is contained in:
galal-hussein 2018-10-01 19:58:29 +02:00 committed by Alena Prokharchyk
parent ce62c898bb
commit 0dbe06d631
2 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ const (
// RestartTimeout in seconds
RestartTimeout = 30
// StopTimeout in seconds
StopTimeout = 30
StopTimeout = 5
)
var K8sDockerVersions = map[string][]string{

View File

@ -23,6 +23,7 @@ const (
EtcdSnapshotPath = "/opt/rke/etcd-snapshots/"
EtcdRestorePath = "/opt/rke/etcd-snapshots-restore/"
EtcdDataDir = "/var/lib/rancher/etcd/"
EtcdInitWaitTime = 5
)
type EtcdSnapshot struct {
@ -174,6 +175,7 @@ func ReloadEtcdCluster(ctx context.Context, readyEtcdHosts []*hosts.Host, newHos
if err := createLogLink(ctx, etcdHost, EtcdContainerName, ETCDRole, alpineImage, prsMap); err != nil {
return err
}
time.Sleep(EtcdInitWaitTime * time.Second)
}
// run the new etcd at last
imageCfg, hostCfg, _ := GetProcessConfig(etcdNodePlanMap[newHost.Address].Processes[EtcdContainerName])