Merge "adding netstat deployment before and after controller deployment"
authorLuis Gomez <ecelgp@gmail.com>
Tue, 13 Oct 2015 17:22:44 +0000 (17:22 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 13 Oct 2015 17:22:44 +0000 (17:22 +0000)
1  2 
jjb/integration/include-raw-integration-deploy-controller-run-test.sh
jjb/integration/include-raw-integration-deploy-controller.sh
jjb/integration/include-raw-integration-start-cluster-run-test.sh

index 865c31a693b36a30ca1875910cd3a89890c433ba,ec9e691e39ed713df6946d8b0063d4669e26b02f..cc617f7a80453ef303639ef56c65423729a9fc14
@@@ -79,10 -84,21 +84,21 @@@ sleep 6
  echo "Checking OSGi bundles..."
  sshpass -p karaf /tmp/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'
  
+ echo "Listing all open ports on controller system"
+ netstat -natu
+ # checking for any bind exceptions in log which could indicate a port conflict
+ if grep --quiet 'BindException: Address already in use' /tmp/${BUNDLEFOLDER}/data/log/karaf.log; then
+     echo BindException found: Possible port conflict
+     echo "Dumping Karaf log..."
+     cat /tmp/${BUNDLEFOLDER}/data/log/karaf.log
+     exit 1
+ fi
  EOF
  
 -scp ${WORKSPACE}/controller-script.sh ${CONTROLLER0}:/tmp
 -ssh ${CONTROLLER0} 'bash /tmp/controller-script.sh'
 +scp ${WORKSPACE}/controller-script.sh ${ODL_SYSTEM_IP}:/tmp
 +ssh ${ODL_SYSTEM_IP} 'bash /tmp/controller-script.sh'
  
  echo "Changing the testplan path..."
  cat ${WORKSPACE}/test/csit/testplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > testplan.txt
index 6bff8acc7ffb79879d61fa02e0bd0d38d86afbf8,d2562f7a2b4f6de960d8d6c3c89208d7251cb5a1..5a0e8debb05ebada1f54e263e50ccbafa74df8c9
@@@ -38,14 -38,17 +38,17 @@@ MEMCONF=/tmp/${BUNDLEFOLDER}/bin/seten
  sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF}
  cat \${MEMCONF}
  
+ echo "Listing all open ports on controller system"
+ netstat -natu
  EOF
  
 -CONTROLLERIPS=(${CONTROLLER0} ${CONTROLLER1} ${CONTROLLER2})
 -for i in "${!CONTROLLERIPS[@]}"
 +ODL_SYSTEM_IPS=(${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP})
 +for i in "${!ODL_SYSTEM_IPS[@]}"
  do
 -    echo "Installing distribution in member-$((i+1)) with IP address ${CONTROLLERIPS[$i]}"
 -    scp ${WORKSPACE}/deploy-controller-script.sh ${CONTROLLERIPS[$i]}:/tmp
 -    ssh ${CONTROLLERIPS[$i]} 'bash /tmp/deploy-controller-script.sh'
 +    echo "Installing distribution in member-$((i+1)) with IP address ${ODL_SYSTEM_IPS[$i]}"
 +    scp ${WORKSPACE}/deploy-controller-script.sh ${ODL_SYSTEM_IPS[$i]}:/tmp
 +    ssh ${ODL_SYSTEM_IPS[$i]} 'bash /tmp/deploy-controller-script.sh'
  done
  
  # vim: ts=4 sw=4 sts=4 et ft=sh :
index ad112030a8885bdf505e33adc0e62a791194b687,7e725a2f36ca3175fad853576d23a8fd6d675b67..4f74dc9086b70e9a18d0b914fc9b721a8bf14433
@@@ -37,14 -39,25 +39,25 @@@ don
  echo "Checking OSGi bundles..."
  sshpass -p karaf /tmp/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'
  
+ echo "Listing all open ports on controller system"
+ netstat -natu
+ # checking for any bind exceptions in log which could indicate a port conflict
+ if grep --quiet 'BindException: Address already in use' /tmp/${BUNDLEFOLDER}/data/log/karaf.log; then
+     echo BindException found: Possible port conflict
+     echo "Dumping Karaf log..."
+     cat /tmp/${BUNDLEFOLDER}/data/log/karaf.log
+     exit 1
+ fi
  EOF
  
 -CONTROLLERIPS=(${CONTROLLER0} ${CONTROLLER1} ${CONTROLLER2})
 -for i in "${!CONTROLLERIPS[@]}"
 +ODL_SYSTEM_IPS=(${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP})
 +for i in "${!ODL_SYSTEM_IPS[@]}"
  do
 -    echo "Verifying member-$((i+1)) with IP address ${CONTROLLERIPS[$i]} is UP"
 -    scp ${WORKSPACE}/verify-cluster-is-up.sh ${CONTROLLERIPS[$i]}:/tmp
 -    ssh ${CONTROLLERIPS[$i]} "bash /tmp/verify-cluster-is-up.sh $((i+1)) ${CONTROLLERIPS[$i]}"
 +    echo "Verifying member-$((i+1)) with IP address ${ODL_SYSTEM_IPS[$i]} is UP"
 +    scp ${WORKSPACE}/verify-cluster-is-up.sh ${ODL_SYSTEM_IPS[$i]}:/tmp
 +    ssh ${ODL_SYSTEM_IPS[$i]} "bash /tmp/verify-cluster-is-up.sh $((i+1)) ${ODL_SYSTEM_IPS[$i]}"
  done
  
  echo "Cool down for 1 min :)..."