Revert "Fix for appc clustering install failure" 84/90184/1
authorPatrick Brady <patrick.brady@att.com>
Wed, 19 Jun 2019 19:12:33 +0000 (12:12 -0700)
committerPatrick Brady <patrick.brady@att.com>
Wed, 19 Jun 2019 19:12:59 +0000 (12:12 -0700)
It is reported that the old version of this script is
currently working, so we will leave it as is for now
and make changes later.

This reverts commit 616fb1cea6cadc5e368f43176eb0f4d5342b87b7.

Change-Id: I38d8bff135fbcc3eb407d2f3fcf295cf58c386d2
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1242

kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh

index 64cf3d9..ed35de8 100755 (executable)
@@ -133,6 +133,7 @@ then
         if $ENABLE_ODL_CLUSTER
         then
                 echo "Installing Opendaylight cluster features"
+                ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
                 enable_odl_cluster
         fi
 
@@ -145,11 +146,24 @@ then
         fi
 
         echo "Restarting OpenDaylight"
-        echo "Stopping OpenDaylight and waiting for it to stop"
         ${ODL_HOME}/bin/stop
-        #The karaf command will exit when odl shuts down. This is the most reliable way to wait for opendaylight to stop
-        #before exiting the docker container.
-        ${ODL_HOME}/bin/karaf
+        checkRun () {
+                running=0
+                while read a b c d e f g h
+                do
+                if [ "$h" == "/bin/sh /opt/opendaylight/bin/karaf server" ]
+                then
+                     running=1
+                fi
+                done < <(ps -eaf)
+                echo $running
+        }
+
+        while [ $( checkRun ) == 1 ]
+        do
+                echo "Karaf is still running, waiting..."
+                sleep 5s
+        done
         echo "Karaf process has stopped"
         sleep 10s