Revert "Cleanup Elasticsearch indices before test" 24/44824/1
authorLuis Gomez <ecelgp@gmail.com>
Tue, 30 Aug 2016 02:12:39 +0000 (02:12 +0000)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 30 Aug 2016 02:12:39 +0000 (02:12 +0000)
This reverts commit 7358817f715ef058296841ea289b131ac3d12c87.

Change-Id: Ia7e8609464779758a690d09646e2de9686b4b530
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/scripts/set_jvm_common_attribute.sh

index 52bd734f8c141d46d61fb2f4e8259fc8563b3b43..44426c74d0f8cbe71d1705d291918f8240d97bdc 100644 (file)
@@ -1,5 +1,13 @@
 #!/bin/bash
 
+cat > ${WORKSPACE}/elasticsearch_startup.sh <<EOF
+cd /tmp/elasticsearch
+echo "Starting Elasticsearch node"
+sudo /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch > /dev/null 2>&1 &
+ls -al /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch
+
+EOF
+
 cat > ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-local.cfg <<EOF
 type=jmx-local
 url=local
@@ -31,33 +39,6 @@ EOF
 
 EOF
 
-    out='{"acknowledged":true}'
-    cmd='http://'${!CONTROLLERIP}':9200/_all'
-    command_='curl -XDELETE '${cmd}' 2> /dev/null'
-    command2='curl '${!CONTROLLERIP}':9200/_cat/indices?v'
-
-    cat > ${WORKSPACE}/elasticsearch_startup.sh <<EOF
-    cd /tmp/elasticsearch
-    echo "Starting Elasticsearch node"
-    sudo /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch > /dev/null 2>&1 &
-    ls -al /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch
-
-    for ((i=1;i<=100;i++));
-    do
-        output=${command_};
-        outpu1=${command2};
-        echo $output1;
-        echo $output;
-        if [[ "$out" ==  "$output" ]];
-        then
-            echo "indices deleted";
-            break;
-        fi
-        echo "could not reach server, retrying";
-        sleep 2;
-    done;
-
-EOF
     echo "Setup ODL_SYSTEM_IP specific config files for ${!CONTROLLERIP} "
 
     cat ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg
@@ -79,4 +60,5 @@ EOF
     scp ${WORKSPACE}/elasticsearch_startup.sh ${!CONTROLLERIP}:/tmp
     ssh ${!CONTROLLERIP} 'bash /tmp/elasticsearch_startup.sh'
     ssh ${!CONTROLLERIP} 'ps aux | grep elasticsearch'
+
 done