Skip to content

Commit

Permalink
add retry for 'add host' (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole00 authored Jan 19, 2022
1 parent ad4463b commit 4a681ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions client/src/test/resources/docker-compose-casigned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,14 @@ services:
- sh
- -c
- |
sleep 3 &&
nebula-console -addr graphd-casigned -port 9669 -u root -p nebula -enable_ssl=true -ssl_root_ca_path /share/resources/test.ca.pem -ssl_cert_path /share/resources/test.derive.crt -ssl_private_key_path /share/resources/test.derive.key --ssl_insecure_skip_verify=true -e 'ADD HOSTS "172.29.2.1":9779' &&
sleep 36000
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;
volumes:
- ./ssl:/share/resources:Z
depends_on:
Expand Down
11 changes: 8 additions & 3 deletions client/src/test/resources/docker-compose-selfsigned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,14 @@ services:
- sh
- -c
- |
sleep 3 &&
nebula-console -addr graphd-selfsigned -port 9669 -u root -p nebula -enable_ssl=true -ssl_root_ca_path /share/resources/test.ca.pem -ssl_cert_path /share/resources/test.derive.crt -ssl_private_key_path /share/resources/test.derive.key --ssl_insecure_skip_verify=true -e 'ADD HOSTS "172.30.2.1":9779' &&
sleep 36000
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;
volumes:
- ./data/graph_self:/data/graph:Z
- ./logs/graph:/logs:Z
Expand Down
11 changes: 8 additions & 3 deletions client/src/test/resources/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,14 @@ services:
- sh
- -c
- |
sleep 3 &&
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' &&
sleep 36000
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;
depends_on:
- graphd0
networks:
Expand Down

0 comments on commit 4a681ba

Please sign in to comment.