Avoid port conflicts between embedded etcd and external etcd (#7320)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/7331/head
zhenshan.cao 2021-08-27 10:13:57 +08:00 committed by GitHub
parent 920b09cf7d
commit 7c60e6aa00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -33,10 +33,10 @@ election-timeout: 1000
quota-backend-bytes: 0
# List of comma separated URLs to listen on for peer traffic.
listen-peer-urls: http://localhost:2380
listen-peer-urls: http://localhost:2480
# List of comma separated URLs to listen on for client traffic.
listen-client-urls: http://localhost:2379
listen-client-urls: http://localhost:2479
# Maximum number of snapshot files to retain (0 is unlimited).
max-snapshots: 5
@ -49,11 +49,11 @@ cors:
# List of this member's peer URLs to advertise to the rest of the cluster.
# The URLs needed to be a comma-separated list.
initial-advertise-peer-urls: http://localhost:2380
initial-advertise-peer-urls: http://localhost:2480
# List of this member's client URLs to advertise to the public.
# The URLs needed to be a comma-separated list.
advertise-client-urls: http://localhost:2379
advertise-client-urls: http://localhost:2479
# Discovery URL used to bootstrap the cluster.
discovery:
@ -68,7 +68,7 @@ discovery-proxy:
discovery-srv:
# Initial cluster configuration for bootstrapping.
initial-cluster:
initial-cluster: default=http://localhost:2480
# Initial cluster token for the etcd cluster during bootstrap.
initial-cluster-token: 'etcd-cluster'
@ -147,4 +147,4 @@ log-outputs: [stderr]
force-new-cluster: false
auto-compaction-mode: periodic
auto-compaction-retention: "1"
auto-compaction-retention: "1"

View File

@ -27,6 +27,7 @@ func TestEmbedEtcd(te *testing.T) {
param := new(paramtable.BaseParamTable)
param.Init()
param.BaseTable.Save("etcd.use.embed", "true")
param.BaseTable.Save("etcd.config.path", "../../../configs/advanced/etcd.yaml")
param.BaseTable.Save("etcd.data.dir", "etcd.test.data.dir")
param.LoadCfgToMemory()
//clean up data