diff options
author | Patrick Brady <pb071s@att.com> | 2018-04-26 10:59:45 -0700 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2018-04-26 18:20:52 +0000 |
commit | 01e568d1057eeaa952fad7ea8534baf59ca5990c (patch) | |
tree | 3b0e35e4d0a3906b1e4e69f8a68ad880a0186907 /installation | |
parent | e5c0f77dbbe2d7302436ae75ac75a174743ba23c (diff) |
Change odl restart method
Adding a script to wait for karaf to stop before
trying to restart, replacing the simple timer that
was there before.
This should allow restart even with a disconnected
event-listener running
Change-Id: Ie0a2affebdf80f1919d40cbb6a0c4df3894b578d
Signed-off-by: Patrick Brady <pb071s@att.com>
Issue-ID: APPC-866
Diffstat (limited to 'installation')
-rw-r--r-- | installation/appc/src/main/scripts/installFeatures.sh | 3 | ||||
-rw-r--r-- | installation/appc/src/main/scripts/startODL.sh | 21 |
2 files changed, 21 insertions, 3 deletions
diff --git a/installation/appc/src/main/scripts/installFeatures.sh b/installation/appc/src/main/scripts/installFeatures.sh index 569b5d1..152b751 100644 --- a/installation/appc/src/main/scripts/installFeatures.sh +++ b/installation/appc/src/main/scripts/installFeatures.sh @@ -84,7 +84,8 @@ APPC_FEATURES_1=" \ appc-config-flow-controller \ appc-config-params \ appc-artifact-handler \ - appc-aai-client" + appc-aai-client \ + appc-event-listener" APPC_FEATURES_UNZIP=" \ appc-metric \ diff --git a/installation/appc/src/main/scripts/startODL.sh b/installation/appc/src/main/scripts/startODL.sh index 46b81bd..90bb3f2 100644 --- a/installation/appc/src/main/scripts/startODL.sh +++ b/installation/appc/src/main/scripts/startODL.sh @@ -113,8 +113,25 @@ then echo "Restarting OpenDaylight" ${ODL_HOME}/bin/stop - echo "Waiting 60 seconds for OpenDaylight stop to complete" - sleep 60 + checkRun () { + running=0 + while read a b c d e f g h + do + if [ "$h" == "/bin/sh /opt/opendaylight/current/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 echo "Installed at `date`" > ${SDNC_HOME}/.installed fi |