mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 01:39:32 +00:00
Add ReusePort/ReuseAddr flags to etcd config
Addresses flakes in etcd CI due to the port still being in TIME_WAIT after the server is shut down between tests Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
15ed009031
commit
9deef77eef
@@ -55,6 +55,8 @@ type ETCDConfig struct {
|
||||
ServerTrust ServerTrust `json:"client-transport-security"`
|
||||
PeerTrust PeerTrust `json:"peer-transport-security"`
|
||||
ForceNewCluster bool `json:"force-new-cluster,omitempty"`
|
||||
ReuseAddress bool `json:"reuse-address,omitempty"`
|
||||
ReusePort bool `json:"reuse-port,omitempty"`
|
||||
HeartbeatInterval int `json:"heartbeat-interval"`
|
||||
ElectionTimeout int `json:"election-timeout"`
|
||||
Logger string `json:"logger"`
|
||||
|
||||
@@ -1035,6 +1035,8 @@ func (e *ETCD) cluster(ctx context.Context, reset bool, options executor.Initial
|
||||
HeartbeatInterval: 500,
|
||||
Logger: "zap",
|
||||
LogOutputs: []string{"stderr"},
|
||||
ReuseAddress: true,
|
||||
ReusePort: true,
|
||||
ListenClientHTTPURLs: e.listenClientHTTPURLs(),
|
||||
|
||||
ExperimentalInitialCorruptCheck: true,
|
||||
@@ -1098,11 +1100,13 @@ func (e *ETCD) StartEmbeddedTemporary(ctx context.Context) error {
|
||||
ListenClientHTTPURLs: clientHTTPURL,
|
||||
ListenPeerURLs: peerURL,
|
||||
Logger: "zap",
|
||||
LogOutputs: []string{"stderr"},
|
||||
ReuseAddress: true,
|
||||
ReusePort: true,
|
||||
HeartbeatInterval: 500,
|
||||
ElectionTimeout: 5000,
|
||||
SnapshotCount: 10000,
|
||||
Name: e.name,
|
||||
LogOutputs: []string{"stderr"},
|
||||
|
||||
ExperimentalInitialCorruptCheck: true,
|
||||
ExperimentalWatchProgressNotifyInterval: e.config.Datastore.NotifyInterval,
|
||||
|
||||
Reference in New Issue
Block a user