summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/resources
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2018-11-16 17:08:12 -0500
committerTimoney, Dan (dt5972) <dtimoney@att.com>2018-11-19 08:59:59 -0500
commiteaa6a24c0971dfd2d3488d2f1ce693a2d76e1549 (patch)
treeda7cf2f5c1e0b3e4ab972e429ba7dd3a35b9b86b /kubernetes/sdnc/resources
parent67b5d6f5ca0bd245efbc00db052753340cbb8afe (diff)
Fix SDNC initialization
Updated start script so that initialization of local file system is handled by a local lockfile, while initialization of database is handled by a lockfile on persistent volume. Change-Id: I5ef6aa672f0863bf0d6b656b7445b42d3fbe12e5 Issue-ID: SDNC-525 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'kubernetes/sdnc/resources')
-rwxr-xr-xkubernetes/sdnc/resources/config/bin/startODL.sh28
1 files changed, 17 insertions, 11 deletions
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh
index b94cf4fa7b..d1b0c995d5 100755
--- a/kubernetes/sdnc/resources/config/bin/startODL.sh
+++ b/kubernetes/sdnc/resources/config/bin/startODL.sh
@@ -86,7 +86,7 @@ MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
GEO_ENABLED=${GEO_ENABLED:-false}
-INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim}
+DBINIT_DIR=${DBINIT_DIR:-/opt/opendaylight/current/daexim}
#
# Wait for database to init properly
@@ -99,20 +99,15 @@ do
done
echo -e "\nmysql ready"
-if [ ! -d ${INSTALLED_DIR} ]
+if [ ! -d ${DBINIT_DIR} ]
then
- mkdir -p ${INSTALLED_DIR}
+ mkdir -p ${DBINIT_DIR}
fi
-if [ ! -f ${INSTALLED_DIR}/.installed ]
+if [ ! -f ${DBINIT_DIR}/.installed ]
then
echo "Installing SDNC database"
${SDNC_HOME}/bin/installSdncDb.sh
- echo "Installing SDN-C keyStore"
- ${SDNC_HOME}/bin/addSdncKeyStore.sh
-
- # No longer needed (this was a workaround for bug in Nitrogen)
- #${CCSDK_HOME}/bin/installOdlHostKey.sh
if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
then
@@ -120,9 +115,20 @@ then
${SDNC_HOME}/svclogic/bin/install.sh
fi
- if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
+ echo "Installed at `date`" > ${DBINIT_DIR}/.installed
+fi
+
+if [ ! -f ${SDNC_HOME}/.installed ]
+then
+ echo "Installing SDN-C keyStore"
+ ${SDNC_HOME}/bin/addSdncKeyStore.sh
+
+ # No longer needed (this was a workaround for bug in Nitrogen)
+ #${CCSDK_HOME}/bin/installOdlHostKey.sh
+
+ if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
- echo "Installed at `date`" > ${INSTALLED_DIR}/.installed
+ echo "Installed at `date`" > ${SDNC_HOME}/.installed
fi
exec ${ODL_HOME}/bin/karaf server