diff options
author | Patrick Brady <patrick.brady@att.com> | 2019-03-01 14:43:25 -0800 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-03-02 02:19:20 +0000 |
commit | 7a8b0061bdb53cbca0e2d7fbadcdb8b96e137cde (patch) | |
tree | 918400bc176571cdc1795db6c52d18a20dce9b35 /installation | |
parent | e701ee516f517c5bed4f32764431d58d79fe06ad (diff) |
Update odl stop detection
Holding the script open until karaf exits is more reliable and
less dependent on operating system than the previous method.
Change-Id: I82e379f5f977e521eff241c8ecbf2031f0c26c74
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1521
Diffstat (limited to 'installation')
-rw-r--r-- | installation/appc/src/main/scripts/dockerInstall.sh | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh index 1196004..a183155 100644 --- a/installation/appc/src/main/scripts/dockerInstall.sh +++ b/installation/appc/src/main/scripts/dockerInstall.sh @@ -61,25 +61,11 @@ echo "" >> $APPC_HOME/data/properties/appc.properties echo "Copying the aaa shiro configuration into opendaylight" cp ${APPC_HOME}/data/aaa-app-config.xml ${ODL_HOME}/etc/opendaylight/datastore/initial/config/aaa-app-config.xml -echo "Stopping OpenDaylight" +echo "Stopping OpenDaylight and waiting for it to stop" ${ODL_HOME}/bin/stop -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 +#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 echo "Karaf process has stopped" sleep 10s |