mirror of
https://github.com/rancher/rke.git
synced 2025-08-21 08:13:09 +00:00
Revert back to 5 seconds for stop timeout
Add init wait time for etcd after reload
This commit is contained in:
parent
ce62c898bb
commit
0dbe06d631
@ -30,7 +30,7 @@ const (
|
|||||||
// RestartTimeout in seconds
|
// RestartTimeout in seconds
|
||||||
RestartTimeout = 30
|
RestartTimeout = 30
|
||||||
// StopTimeout in seconds
|
// StopTimeout in seconds
|
||||||
StopTimeout = 30
|
StopTimeout = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
var K8sDockerVersions = map[string][]string{
|
var K8sDockerVersions = map[string][]string{
|
||||||
|
@ -23,6 +23,7 @@ const (
|
|||||||
EtcdSnapshotPath = "/opt/rke/etcd-snapshots/"
|
EtcdSnapshotPath = "/opt/rke/etcd-snapshots/"
|
||||||
EtcdRestorePath = "/opt/rke/etcd-snapshots-restore/"
|
EtcdRestorePath = "/opt/rke/etcd-snapshots-restore/"
|
||||||
EtcdDataDir = "/var/lib/rancher/etcd/"
|
EtcdDataDir = "/var/lib/rancher/etcd/"
|
||||||
|
EtcdInitWaitTime = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
type EtcdSnapshot struct {
|
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 {
|
if err := createLogLink(ctx, etcdHost, EtcdContainerName, ETCDRole, alpineImage, prsMap); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
time.Sleep(EtcdInitWaitTime * time.Second)
|
||||||
}
|
}
|
||||||
// run the new etcd at last
|
// run the new etcd at last
|
||||||
imageCfg, hostCfg, _ := GetProcessConfig(etcdNodePlanMap[newHost.Address].Processes[EtcdContainerName])
|
imageCfg, hostCfg, _ := GetProcessConfig(etcdNodePlanMap[newHost.Address].Processes[EtcdContainerName])
|
||||||
|
Loading…
Reference in New Issue
Block a user