summaryrefslogtreecommitdiffstats
path: root/odlsli/src/main/scripts
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2018-03-09 15:46:21 -0500
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-03-12 16:24:38 -0400
commite2693ccbcb97d2ab5767cfde00349a9d1aa946f6 (patch)
treee00dc72fae9e0586959e0d40ac632eec3dbd0cb9 /odlsli/src/main/scripts
parent01435ccac1188d80b99dbb13c7064146ce569a52 (diff)
Fix odlsli restart issue
Instead of restarting container (which seems to fail), just start karaf client in foreground at end of startODL.sh to cause docker container to stay up as long as karaf is up. Also, remove Carbon container which is no longer needed for ONAP Beijing, and produces false positives in security scan. Change-Id: I8ea49769899cea206f46657bf6a3660d6a8a8d97 Issue-ID: CCSDK-208 Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'odlsli/src/main/scripts')
-rw-r--r--odlsli/src/main/scripts/startODL.sh39
1 files changed, 19 insertions, 20 deletions
diff --git a/odlsli/src/main/scripts/startODL.sh b/odlsli/src/main/scripts/startODL.sh
index 70341af9..75f51b35 100644
--- a/odlsli/src/main/scripts/startODL.sh
+++ b/odlsli/src/main/scripts/startODL.sh
@@ -5,7 +5,7 @@
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -30,6 +30,12 @@ CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
SLEEP_TIME=${SLEEP_TIME:-120}
MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+# Start karaf
+echo "Starting OpenDaylight"
+${ODL_HOME}/bin/start
+echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
+sleep ${SLEEP_TIME}
+
#
# Wait for database
#
@@ -43,26 +49,19 @@ echo -e "\nmysql ready"
if [ ! -f ${CCSDK_HOME}/.installed ]
then
- echo "Installing SDN-C database"
- ${CCSDK_HOME}/bin/installSdncDb.sh
- echo "Starting OpenDaylight"
- ${ODL_HOME}/bin/start
- echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
- sleep ${SLEEP_TIME}
- echo "Installing SDN-C platform features"
- ${CCSDK_HOME}/bin/installFeatures.sh
- if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
- then
- echo "Installing directed graphs"
- ${CCSDK_HOME}/svclogic/bin/install.sh
- fi
+ echo "Installing SDN-C database"
+ ${CCSDK_HOME}/bin/installSdncDb.sh
+ echo "Installing SDN-C platform features"
+ ${CCSDK_HOME}/bin/installFeatures.sh
+ if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
+ then
+ echo "Installing directed graphs"
+ ${CCSDK_HOME}/svclogic/bin/install.sh
+ fi
- echo "Restarting OpenDaylight"
- ${ODL_HOME}/bin/stop
- echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to stop"
- sleep ${SLEEP_TIME}
- echo "Installed at `date`" > ${CCSDK_HOME}/.installed
+ echo "Installed at `date`" > ${CCSDK_HOME}/.installed
fi
-exec ${ODL_HOME}/bin/karaf server
+# Start client to force a wait on state of karaf server
+${ODL_HOME}/bin/client