From: Alexis de Talhouƫt Date: Mon, 10 Dec 2018 13:39:15 +0000 (+0000) Subject: Merge "Save journal and snapshots to persistent storage" into casablanca X-Git-Tag: 3.0.1-ONAP~28 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=addadad3fd4641c321be6aacd9c7e047cafef5b2;hp=d8a534ea354fd4a6a7b27943b0fafb2c5d52f913;p=oom.git Merge "Save journal and snapshots to persistent storage" into casablanca --- diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh index d1b0c995d5..50cf7659b5 100755 --- a/kubernetes/sdnc/resources/config/bin/startODL.sh +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -131,5 +131,29 @@ then echo "Installed at `date`" > ${SDNC_HOME}/.installed fi + +# Move journal and snapshots directory to persistent storage + +hostdir=${ODL_HOME}/daexim/$(hostname -s) +if [ ! -d $hostdir ] +then + mkdir -p $hostdir + if [ -d ${ODL_HOME}/journal ] + then + mv ${ODL_HOME}/journal ${hostdir} + else + mkdir ${hostdir}/journal + fi + if [ -d ${ODL_HOME}/snapshots ] + then + mv ${ODL_HOME}/snapshots ${hostdir} + else + mkdir ${hostdir}/snapshots + fi +fi + +ln -s ${hostdir}/journal ${ODL_HOME}/journal +ln -s ${hostdir}/snapshots ${ODL_HOME}/snapshots + exec ${ODL_HOME}/bin/karaf server