Skip to content
Snippets Groups Projects
Commit 6e4548a8 authored by Julien Leduc's avatar Julien Leduc
Browse files

Purging Oracle DB recycle bin in init, otherwise CI DB size explodes because...

Purging Oracle DB recycle bin in init, otherwise CI DB size explodes because of the recycle bin content.
parent 600a5f06
No related branches found
No related tags found
No related merge requests found
select * from user_ts_quotas;
SELECT * FROM RECYCLEBIN;
SELECT * FROM USER_RECYCLEBIN;
purge recyclebin;
quit;
......@@ -2,12 +2,15 @@
. /opt/run/bin/init_pod.sh
# oracle sqlplus client binary path
ORACLE_SQLPLUS="/usr/bin/sqlplus64"
# enable cta repository from previously built artifacts
yum-config-manager --enable cta-artifacts
yum-config-manager --enable ceph
# install needed packages
yum -y install cta-objectstore-tools cta-doc mt-st mtx lsscsi sg3_utils cta-catalogueutils ceph-common
yum -y install cta-objectstore-tools cta-doc mt-st mtx lsscsi sg3_utils cta-catalogueutils ceph-common oracle-instantclient-sqlplus
yum clean packages
echo "Using this configuration for library:"
......@@ -54,6 +57,10 @@ if [ "$KEEP_DATABASE" == "0" ]; then
cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
chmod -R 777 $(dirname $(echo ${DATABASEURL} | cut -d: -f2)) # needed?
else
# Oracle DB
echo "Purging Oracle recycle bin"
test -f ${ORACLE_SQLPLUS} || echo "ERROR: ORACLE SQLPLUS client is not present, cannot purge recycle bin: ${ORACLE_SQLPLUS}"
LD_LIBRARY_PATH=$(readlink ${ORACLE_SQLPLUS} | sed -e 's;/bin/[^/]\+;/lib;') ${ORACLE_SQLPLUS} $(echo $DATABASEURL | sed -e 's/oracle://') @/opt/ci/init/purge_recyclebin.ext
cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
fi
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment