mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
main: use a new cluster by default
This is a safe default for now. Use it to make `./etcd` work again.
This commit is contained in:
parent
3ca3c9ad4c
commit
6cbc282be1
3
main.go
3
main.go
@ -59,11 +59,12 @@ var (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.Var(cluster, "initial-cluster", "Initial cluster configuration for bootstrapping")
|
flag.Var(cluster, "initial-cluster", "Initial cluster configuration for bootstrapping")
|
||||||
flag.Var(clusterState, "initial-cluster-state", "Initial cluster configuration for bootstrapping")
|
|
||||||
if err := cluster.Set("default=http://localhost:2380,default=http://localhost:7001"); err != nil {
|
if err := cluster.Set("default=http://localhost:2380,default=http://localhost:7001"); err != nil {
|
||||||
// Should never happen
|
// Should never happen
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
|
flag.Var(clusterState, "initial-cluster-state", "Initial cluster configuration for bootstrapping")
|
||||||
|
clusterState.Set(etcdserver.ClusterStateValueNew)
|
||||||
|
|
||||||
flag.Var(flagtypes.NewURLsValue("http://localhost:2380,http://localhost:7001"), "advertise-peer-urls", "List of this member's peer URLs to advertise to the rest of the cluster")
|
flag.Var(flagtypes.NewURLsValue("http://localhost:2380,http://localhost:7001"), "advertise-peer-urls", "List of this member's peer URLs to advertise to the rest of the cluster")
|
||||||
flag.Var(flagtypes.NewURLsValue("http://localhost:2379,http://localhost:4001"), "advertise-client-urls", "List of this member's client URLs to advertise to the rest of the cluster")
|
flag.Var(flagtypes.NewURLsValue("http://localhost:2379,http://localhost:4001"), "advertise-client-urls", "List of this member's client URLs to advertise to the rest of the cluster")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user