X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-controller-run-test.sh;h=021161e61d6a10646aaf01618dba9d0eae810bc1;hb=211eaee50a24c864af8d355417a1897dc7fc56db;hp=f4d56ac2def12c4b64bbc8790608a04188dba5a2;hpb=dd127697545ae248565a4fb8b0468691bed3d522;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-deploy-controller-run-test.sh b/jjb/integration/integration-deploy-controller-run-test.sh index f4d56ac2d..021161e61 100644 --- a/jjb/integration/integration-deploy-controller-run-test.sh +++ b/jjb/integration/integration-deploy-controller-run-test.sh @@ -69,7 +69,7 @@ if [[ "$KARAF_VERSION" == "karaf4" ]]; then FEATURE_TEST_STRING="features-test" fi -sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF} +sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF} if [[ ! -z "${REPO_URL}" ]]; then sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF} fi @@ -155,70 +155,29 @@ if [[ "$USEFEATURESBOOT" != "True" ]]; then feature:list -i fi -if [ "${DISTROSTREAM}" == "carbon" ] || [ "${DISTROSTREAM}" == "nitrogen" ]; -then - echo "only oxygen and above have the infrautils.ready feature, so using REST API to /modules or /shards to determine if the controller is ready."; - - COUNT="0" - - while true; do - RESP="\$( curl --user admin:admin -sL -w "%{http_code} %{url_effective}\\n" http://localhost:8181/restconf/modules -o /dev/null )" - echo \$RESP - - if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then - SHARD="\$( curl --user admin:admin -sL -w "%{http_code} %{url_effective}\\n" http://localhost:8181/jolokia/read/org.opendaylight.controller:Category=Shards,name=\member-\$1-shard-inventory-config,type=DistributedConfigDatastore)" - echo \$SHARD - fi - - if ([[ \$RESP == *"200"* ]] && ([[ "${ENABLE_HAPROXY_FOR_NEUTRON}" != "yes" ]] || [[ \$SHARD == *'"status":200'* ]])); then - echo "Controller is UP" - break - - elif (( "\$COUNT" > "600" )); then - echo Timeout Controller DOWN - echo "Dumping first 500K bytes of karaf log..." - head --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" - echo "Dumping last 500K bytes of karaf log..." - tail --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" - echo "Listing all open ports on controller system" - netstat -pnatu - exit 1 - else - - COUNT=\$(( \${COUNT} + 1 )) - sleep 1 - - if [[ \$((\$COUNT % 5)) == 0 ]]; then - echo already waited \${COUNT} seconds... - fi - fi - done - -else - echo "Waiting up to 3 minutes for controller to come up, checking every 5 seconds..." - for i in {1..36}; - do sleep 5; - grep 'org.opendaylight.infrautils.ready-impl.*System ready' /tmp/${BUNDLEFOLDER}/data/log/karaf.log - if [ \$? -eq 0 ] - then - echo "Controller is UP" - break - fi - done; - - # if we ended up not finding ready status in the above loop, we can output some debugs +echo "Waiting up to 3 minutes for controller to come up, checking every 5 seconds..." +for i in {1..36}; + do sleep 5; grep 'org.opendaylight.infrautils.ready-impl.*System ready' /tmp/${BUNDLEFOLDER}/data/log/karaf.log - if [ $? -ne 0 ] + if [ \$? -eq 0 ] then - echo "Timeout Controller DOWN" - echo "Dumping first 500K bytes of karaf log..." - head --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" - echo "Dumping last 500K bytes of karaf log..." - tail --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" - echo "Listing all open ports on controller system" - netstat -pnatu - exit 1 + echo "Controller is UP" + break fi +done; + +# if we ended up not finding ready status in the above loop, we can output some debugs +grep 'org.opendaylight.infrautils.ready-impl.*System ready' /tmp/${BUNDLEFOLDER}/data/log/karaf.log +if [ $? -ne 0 ] +then + echo "Timeout Controller DOWN" + echo "Dumping first 500K bytes of karaf log..." + head --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" + echo "Dumping last 500K bytes of karaf log..." + tail --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" + echo "Listing all open ports on controller system" + netstat -pnatu + exit 1 fi echo "Listing all open ports on controller system..." @@ -363,6 +322,7 @@ pybot -N ${TESTPLAN} \ -v CONTROLLER_USER:${USER} \ -v JAVA_HOME:${JAVA_HOME} \ -v JDKVERSION:${JDKVERSION} \ + -v JENKINS_WORKSPACE:${WORKSPACE} \ -v MININET1:${TOOLS_SYSTEM_2_IP} \ -v MININET2:${TOOLS_SYSTEM_3_IP} \ -v MININET3:${TOOLS_SYSTEM_4_IP} \ @@ -372,10 +332,12 @@ pybot -N ${TESTPLAN} \ -v MININET_USER:${USER} \ -v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} \ -v NUM_ODL_SYSTEM:${NUM_ODL_SYSTEM} \ + -v NUM_TOOLS_SYSTEM:${NUM_TOOLS_SYSTEM} \ -v ODL_STREAM:${DISTROSTREAM} \ -v ODL_SYSTEM_1_IP:${ODL_SYSTEM_IP} \ -v ODL_SYSTEM_IP:${ODL_SYSTEM_IP} \ -v ODL_SYSTEM_USER:${USER} \ + -v TOOLS_SYSTEM_1_IP:${TOOLS_SYSTEM_IP} \ -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \ -v TOOLS_SYSTEM_3_IP:${TOOLS_SYSTEM_3_IP} \ -v TOOLS_SYSTEM_4_IP:${TOOLS_SYSTEM_4_IP} \