summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2018-12-07 18:07:03 -0500
committerTimoney, Dan (dt5972) <dtimoney@att.com>2018-12-07 18:07:03 -0500
commit6ee66350cc9bfcc87f3c2e6ad3545350cd1f96b8 (patch)
tree252edf0e7bc98ec2beb59b4d192c96945287ede8
parenta64d142c7ba40b57430e62e7785df96dfab1ddbf (diff)
Save journal and snapshots to persistent storage
Updated startODL.sh script to point ODL's 'journal' and 'snapshots' directories, used to store MDSAL data, to the persistent volume mount. Change-Id: I8307b7f9cd2579b1dcab0413cc3275940e2c3a12 Issue-ID: SDNC-549 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
-rwxr-xr-xkubernetes/sdnc/resources/config/bin/startODL.sh24
1 files changed, 24 insertions, 0 deletions
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