This repository was archived by the owner on Apr 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
core/src/main/java/io/javaoperatorsdk/jenvtest/process Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,19 @@ public EtcdProcess(BinaryManager binaryManager,
3232 public int startEtcd () {
3333 var etcdBinary = binaryManager .binaries ().getEtcd ();
3434 var port = Utils .findFreePort ();
35+ var peerPort = Utils .findFreePort ();
3536 try {
3637 if (!etcdBinary .exists ()) {
3738 throw new JenvtestException (
3839 "Missing binary for etcd on path: " + etcdBinary .getAbsolutePath ());
3940 }
4041 etcdProcess = new ProcessBuilder (etcdBinary .getAbsolutePath (),
41- "--listen-client-urls=http://0.0.0.0:" + port ,
42- "--advertise-client-urls=http://0.0.0.0:" + port )
42+ "--listen-client-urls" , "http://0.0.0.0:" + port ,
43+ "--advertise-client-urls" , "http://0.0.0.0:" + port ,
44+ // the below added because of stability
45+ "--initial-cluster" , "default=http://localhost:" + peerPort ,
46+ "--initial-advertise-peer-urls" , "http://localhost:" + peerPort ,
47+ "--listen-peer-urls" , "http://localhost:" + peerPort )
4348 .start ();
4449 Utils .redirectProcessOutputToLogger (etcdProcess .getInputStream (), etcdLog );
4550 Utils .redirectProcessOutputToLogger (etcdProcess .getErrorStream (), etcdLog );
You can’t perform that action at this time.
0 commit comments