mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add timeout to nc command, as it was waiting forever and not going through the while loop. This will make sure nc gets restared to retry in case something nasty is happening in the running process
host command not present in build env, switch to getent second phase of dep download turning some error, print failure log Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
parent
c1c0382bf5
commit
7838bfcc70
@ -99,7 +99,7 @@ do
|
||||
fi
|
||||
echo -e "\nDependency download failed"
|
||||
#Test DNS record
|
||||
host repo1.maven.org
|
||||
getent hosts repo1.maven.org
|
||||
while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
|
||||
done
|
||||
|
||||
@ -111,14 +111,15 @@ echo -e "$(cat pom.xml |wc -l) lines in dummy pom.xml"
|
||||
|
||||
for ((i=0;i<$RETRY_COUNT;i++))
|
||||
do
|
||||
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /dev/null
|
||||
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /tmp/phase2
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "\nProject dependencies downloaded successfully"
|
||||
break;
|
||||
fi
|
||||
echo -e "\nDependency download failed"
|
||||
cat /tmp/phase2
|
||||
#Test DNS record
|
||||
host repo1.maven.org
|
||||
getent hosts repo1.maven.org
|
||||
while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
|
||||
done
|
||||
cd ../..
|
||||
|
||||
@ -42,6 +42,6 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
|
||||
echo -e "\nStarting simulator"
|
||||
mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
|
||||
|
||||
while ! nc -vz localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
|
||||
while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
|
||||
echo -e "\nStarting simulator"
|
||||
python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user