nebula-docker-compose
nebula-docker-compose copied to clipboard
make console depend on all graphds
close: #126
credit goes to @imrefazekas
As observed by @imrefazekas it took some time for the cluster to be ready to receive the console call, this change helped fix it.
why this? console just connect to FIRST graph, no need to wait other graphds.
prefer a loop like: https://github.com/vesoft-inc/nebula-python/blob/master/tests/docker-compose.yaml
for i in `seq 1 60`;do
var=`nebula-console -addr graphd0 -port 9669 -u root -p nebula -e 'ADD HOSTS "172.28.2.1":9779,"172.28.2.2":9779,"172.28.2.3":9779;'`;
if [[ $$? == 0 ]];then
break;
fi;
sleep 1;
echo "retry to add hosts.";
done && tail -f /dev/null;
for i in `seq 1 60`;do var=`nebula-console -addr graphd0 -port 9669 -u root -p nebula -e 'ADD HOSTS "172.28.2.1":9779,"172.28.2.2":9779,"172.28.2.3":9779;'`; if [[ $$? == 0 ]];then break; fi; sleep 1; echo "retry to add hosts."; done && tail -f /dev/null;
This is better, I'll close this, could you port your implementation here?